# HG changeset patch # User kent # Date 1265535010 -32400 # Node ID d0e37615691e1a8e3c6447f1d6c64e16eef6be6e # Parent 4e0a8e84ee55af6a5a4480109b411681097ab87c# Parent c156f1bd5cd9fc72e176babf01029895b4c87228 merge tags. diff -r c156f1bd5cd9 -r d0e37615691e .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,10 @@ +syntax: glob + +*.o +*.s +.*.swp +.*.swo +GTAGS +GRTAGS +GSYMS +GPATH diff -r c156f1bd5cd9 -r d0e37615691e .hgtags diff -r c156f1bd5cd9 -r d0e37615691e .hgtags.orig --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgtags.orig Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,4 @@ +a06113de4d676b497759e6a9bf820a208b02e09b gcc.4.4.0 +855418dad1a3a87de4782b8184eef35cd8812e23 gcc.4.4.2 +d096b2ff82d9016ec5bc3d0ba69810564d0c7437 gcc-4.4.3 +2e19f845ea375ef3bf7528fed439ecab0c6e53b5 cbc-4.4.3 diff -r c156f1bd5cd9 -r d0e37615691e CbC-INSTALL --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-INSTALL Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,220 @@ + + * CbC on GCCのインストール方法 + +まずはMercurialリポジトリから取得 + hg clone ssh://one@firefly.cr/hg/CbC/GCC cbc-gcc +ビルド用ディレクトリへ + mkdir build-gcc; cd build-gcc +コンフィギュア +一般的には以下のconfigureでビルドできる + ../cbc-gcc/configure CFLAGS="-g3 -O0" + --prefix=$PWD/INSTALL_DIR --disable-nls \ + --disable-bootstrap --enable-languages=c \ + --enable-checking=tree,rtl,assert,types + + -g3: + gdbでmacroの展開を可能にする + -O0: + gdbでトレースしやすいように、最適化をカット + --prefix: + インストールするベースディレクトリ + --enbale-checking: + デバグ用の指定、browse_treeやdebug_rtx、assertもこれでonになる + --disable-bootstrap: + 通常、GCCは3回ビルドされる。それを最初の1回だけに限定 + --disable-nls: + gettextのl10nをoffにしよう + --enable-language: + 使用する言語 c|c++|ada ... もちろんCbCはcだけ + これもcbcを使えるようにしたい +ビルド +make && make install + + + + * PowerPC Macでのインストール + +最新のlibgmp, libmpfrをインストール +[gmp] + ./configure --enable-cxx --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9 + make && make install +[mpfr] + ./configure --build=powerpc-apple-darwin9 --host=powerpc-apple-darwin9 + make && make install +[CbC on GCC] + ../cbc-gcc/configure CFLAGS="-g3 -O0" --with-gmp=/usr/local + --with-mpfr=/usr/local --prefix=$PWD/INSTALL_DIR \ + --disable-nls --disable-bootstrap --enable-languages=c \ + --enable-checking=tree,rtl,assert,types + make && make install +もちろんインストール場所によってprefixは変更しよう + + + + + * PS3でのビルド + SPU + $ ../GCC/configure CFLAGS='-g -O0' --prefix=$PWD/INSTALL_DIR + --disable-nls --disable-shared --disable-threads + --enable-checking=tree,rtl,assert --with-system-zlib + --with-newlib --enable-languages=c + --enable-version-specific-runtime-libs --disable-libssp + --program-prefix=cbc-spu- --target=spu --disable-bootstrap + $ make && make install + $ cd INSTALL_DIR; ln -s /usr/spu; cd .. + で、動作確認のあと + $ sudo make prefix=/usr/local/cbc install + $ cd /usr/local/cbc; ln -s /usr/spu; cd - + + PPU + $ ../GCC/configure --prefix=$PWD/INSTALL_DIR + --host=ppc64-redhat-linux --build=ppc64-redhat-linux + --target=ppc64-redhat-linux --program-prefix=cbc- --disable-bootstrap + --enable-checking=tree,rtl,assert --disable-nls --enable-shared + --enable-thread=posix --enable-languages=c --with-system-zlib + --enable-__cxa_atexit --disable-libunwind-exceptions --disable-dssi + --enable-plugin --with-long-double-128 --with-gnu-as + --with-as=/usr/bin/as --with-gnu-ld --with-ld=/usr/bin/ld + --with-cpu=default32 + $ make && make install + 動作確認 + $ make prefix=/usr/local/cbc install + + + + * 琉球大学総合情報センターのSolarisサーバでのビルド (sparc) + +なぜかデフォルトのgccが自分のライブラリすら見てくれないのでパスを指定 + export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib + export LIBRARY_PATH=/usr/local/lib:/usr/local/lib/gcc:$HOME/opt/lib +gmpのインストール + ./configure --prefix=$HOME/opt \ + --build=sparc-sun-solaris \ + --host=sparc-sun-solaris + make + make check + make install +libmpfrのインストール + ./configure --prefix=$HOME/opt/ \ + --with-gmp=$HOME/opt + --build=sparc-sun-solaris \ + --host=sparc-sun-solaris + make + make check + make install + # sparc-sun-solaris2.10の方がいいかもしれない +CbCをインストール + ../CbCGCC/configure --prefix=$PWD/INSTALL_DIR --disable-nls \ + --disable-bootstrap --enable-languages=c \ + --with-gmp=$HOME/opt --with-mpfr=$HOME/opt \ + --build=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10 \ + --host=sparc-sun-solaris2.10 --enable-shared \ + --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld + make + make install +ビルドは可能。 +ただし、実行は不能 goto cs();すら動かない +config/sparc/sparc.cのoutput_sibcall()でエラーが出る +gdbがインストールされてないので詳細は未調査 +もしかしてsibcallってあまり実装されてないんじゃ… + + + +___________________________________________________________ + PS3用のクロスコンパイラの作成 +----------------------------------------------------------- + +PS3でのGCCのビルドはメモリが少なすぎるためか、insn-*.cのコンパイルに膨 +大な時間がかかってしまう。 +なので別のマシンからPS3をターゲットとしたクロスコンパイラを作成する。 +ただしこれはCbConGCCの開発のためと考えた方が良い。実際にCbC言語を使っ +たプログラムをPS3で開発する際はちゃんとPS3上にノンクロスコンパイラを作 +成しよう。時間はかかるがビルドは可能。 + + * 必要なもの + o binutilsのソース + o gccのソース + o ターゲットマシンのlib*.{a,so}類 + o ターゲットマシンの.hファイル + ~/PS3CROSSにクロスコンパイラ環境を整えるとする + ~/PS3CROSS/cross-tools: クロスコンパイルに使うツールのインストール先 + ~/PS3CROSS/sources: ソース置き場、出来上がったら消してもいいよ + ~/PS3CROSS/target-env: ターゲット環境(libやinclude)が入ったディレクトリ + + * 準備 + $ CROSS=$HOME/PS3CROSS + $ cd $CROSS + $ mkdir sources cross-tools target-env + $ cd sources + $ wget ... binutilsとかgccのソースをダウンロード + + * binutilsのビルド + $ tar xvf binutils..tar.gz + $ mkdir PS3-binutils-build; cd !#1 + $ ../binutils-.../configure --prefix=$CROSS/cross-tools \ + --with-lib-path=$CROSS/target-env \ + --hosti686-pc-linux-gnu --build=i686-pc-linux-gnu \ + --target=ppc64-redhat-linux --enable-64-bit-bfd \ + --disable-nls --enable-shared --with-sysroot + $ make && make install + + * ターゲットマシンの環境をコピーする + $ cd $CROSS/target-env + $ mkdir include lib lib64 + $ ln -s . usr + ## 必要なライブラリはすべてコピー + $ cd lib + $ rsync -avl 'charles.cr:/lib/libc[.-_]*' ./ + $ rsync -avl 'charles.cr:/usr/lib/libc[.-_]*' ./ + $ rsync -avl 'charles.cr:/usr/lib/crt*' ./ + $ rsync -avl 'charles.cr:/lib/ld*' ./ + $ cd ../lib64 + $ ..... + ## ヘッダは軽いので全部コピー + $ cd ../include + $ rsync -avl 'charles.cr:/usr/include/*' ./ + + * GCCのビルド + $ cd $CROSS/sources + $ mkdir PS3-gcc-build; cd !#1 + $ ../.../configure --prefix=$CROSS/cross-tools + --host=i686-pc-linux-gnu --target=ppc64-redhat-linux + --with-sysroot=$CROSS/target-env --disable-nls + --disable-shared --disable-threads + --enable-languages=c --without-headers + --disable-bootstrap + $ make all-gcc + $ make ## エラーで終わるけど気にするな + $ make install-gcc + $ make install-target-libgcc + + * テスト + $ cat >test.c < + int + main(int argc, char **argv) + { + int a=0; + int i; + for (i=0; i<10; i++) { + a = i; + } + printf("hello world\n"); + printf("a = %d\n", a); + return a; + } + EOF + $ $CROSS/cross-tools/bin/gcc -m32 test.c -o test32 + $ $CROSS/cross-tools/bin/gcc -m64 test.c -o test64 + $ file test32 test64 + test32: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped + test64: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped + $ scp test{32,64} PS3Machine: + PS3Machine $ ./test32 + + + + + + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-REPOSITORY --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-REPOSITORY Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,57 @@ + + * CbC/GCCのリポジトリ管理方法 + +Continuation based C のGCC実装用には二つのリポジトリを仕様する + + o CbC/GCC + 実際にCbCを実装したGCCの本体 + o CbC/GCC_original + オリジナルのGCC。本家のgcc-core-4.x.yをそのままリポジトリ化。 + +GCC_origのほうはGCCがリリースされる度にバージョンアップさせ、コミットする。 +さらにその変更をCbC用のGCCリポジトリにpushする + + 本家 + release GCC_orig GCC + | | | + | 4.4.0 4.4.0-cbc + 4.4.1 up | | + | --> 4.4.1 push | + | | --> 4.4.1-cbc + | | | + 4.4.2 up | | + | --> 4.4.2 push | + | | --> 4.4.2-cbc + | | | + + + * 本家GCCのニューリリース時の対応 + +GCC_originalをアップデート + $ cd $HOME + $ wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.4.1/gcc-core-4.x.y.tar.gz + $ tar xvf gcc-core-4.x.y.tar.gz + $ cd gcc-4.x.y + $ cd ${HG_REPO}/CbC/GCC_original + $ rm -rf * + $ mv ${HOME}/gcc-4.4.1/* ./ + $ hg commit + +GCC_originalが最新のGCCになったら、その変更をGCCにpushする +GCC_originalからGCCへのpush + $ cd ${HOME} + $ mkdir workspace;cd workspace # 作業ディレクトリ作成 + $ hg clone ${HG}/one/CbC/GCC # CbC用のGCCをクローン + $ cd GCC + $ hg incoming ${HG}/one/CbC/GCC_original # チェック + $ hg pull ${HG}/one/CbC/GCC_original # pull + +この時点で、場合によっては衝突が起こる。ほとんどはgcc/calls.cの中だと +思われる。また、expand_call関数が大幅に変更されたならgcc/cbc-goto.hも +同じように書き換える必要があるかもしれない。 +がんばって動くまで修正したら + $ hg commit + $ hg push ${HG}/one/CbC/GCC # push +これで最新版に更新される + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/.gdb_history --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/.gdb_history Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,256 @@ +p debug_rtx(funexp) +run -O2 test_para2.c +p browse_tree (exp) +c +p browse_tree (exp) +n +p debug_rtx(funexp) +n +p debug_rtx(funexp) +n +p debug_rtx(get_last_insn()) +c +run -O2 test_csp1.c +p browse_tree (exp) +n +p debug_rtx(get_last_insn()) +c +b recog.c:2077 +run +c +p insn +p debug_rtx(insn) +backtrace +l +info b +del 2 +b recog.c:2078 +run +del 3 +b recog.c:2076 +c +l +p icode +c +p icode +c +c +p icode +n +c +n +c +c +c +c +run +c +p icode +backtrace +run +backtrace +info b +del 4 +b recog.c:2077 +run +backtrace +info b +disable 1 +info b +c +backtrace +quit +b expand_call +run -O2 test_para2.c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +n +p browse_tree (fntype) +quit +b expand_call +run -O2 test04.c +p browse_tree (exp) +c +p browse_tree (exp) +n +p browse_tree (fntype ) +p browse_tree (fntype->type.values ) +p browse_tree (fntype->type.values->value ) +p browse_tree (fntype->type.values->type.value ) +p browse_tree (fntype->type.values->type.values ) +p browse_tree (fntype->type.values ) +p browse_tree (fntype->type.values->list.vlaue ) +p browse_tree (fntype->type.values->list.value ) +p browse_tree (fntype->type.values->common.chain ) +p browse_tree (fntype->type.value ) +p browse_tree (fntype->type.values ) +p browse_tree (fntype ) +l +p browse_tree (exp) +q +quit +b expand_call +run -O2 test04.c +p browse_tree (exp) +c +p browse_tree (exp) +p browse_tree (exp) +p browse_tree (exp) +p browse_tree (exp->exp.operands[1])) +p browse_tree (exp->exp.operands[1]) +p browse_tree (exp) +quit +b expand_call +run -O2 test_tailcall1.c +l +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +n +p browse_tree (fndecl) +p fndecl +n +p browse_tree (fntype) +n +p pass +p try_tail_call +run +c +c +p browse_tree (exp) +p try_tail_call +l +info stack +n +p try_tail_call +n +p try_tail_call +n +p try_tail_call +n +p try_tail_call +n +l +l - +l - +p try_tail_call +n +n +p browse_tree (exp) +n +n +n +n +p pass +p try_tail_call +quit +b expand_call +run -O2 test_tailcall1.c +cc +c +c +p browse_tree (exp) +n +p try_tail_call +n +p tree +p p +n +p p +p addr +n +p addr +n +p fndecl +n +p fndecl +n +p fntype +n +n +p funtype +n +p funtype +n +p try_tail_call +n +p try_tail_call +quit +b expand_call +run -O2 test_tailcall1.c +c +c +p browse_tree (exp) +n +p try_tail_call +n +p try_tail_call +n +n +p try_tail_call +n +p pass +quit +b expand_call +run -O2 test_tailcall1.c +p browse_tree (exp) +c +c +p browse_tree (exp) +n +p try_tail_call +n +p try_tail_call +p fndecl +p targetm.function_ok_for_sibcall(fndecl,exp) +run +c +c +n +p browse_tree (exp) +n +s +l +p decl +p exp +p browse_tree(exp) +n +s +s +quit +run -O2 test03.c +b expand_call +run +n +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +c +quit +b expand_call +run -O2 test_para2.c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +c +p browse_tree (exp) +n +s +n +p debug_rtx(get_last_insn()) +quit diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/bug.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/bug.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,19 @@ +typedef void (*atexit_callback)(void); +typedef void (*cxa_atexit_callback)(void *); +struct one_atexit_routine +{ + int callback; +}; + + +static int +atexit_common (const struct one_atexit_routine *r, const void *dso) + + +{ + return 0; +} + +int main(){ + printf("hello\n"); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/c-parser.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/c-parser.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,30292 @@ +# 1 "../../GCC/gcc/c-parser.c" +# 1 "/home/kent/cvs_tmp/CbC_project/build-test/gcc//" +# 1 "" +# 1 "" +# 1 "../../GCC/gcc/c-parser.c" +# 39 "../../GCC/gcc/c-parser.c" +# 1 "./config.h" 1 + + + + + +# 1 "./auto-host.h" 1 +# 7 "./config.h" 2 + +# 1 "../../GCC/gcc/../include/ansidecl.h" 1 +# 9 "./config.h" 2 +# 40 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/system.h" 1 +# 27 "../../GCC/gcc/system.h" +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 1 3 4 +# 43 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 105 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stdarg.h" 3 4 +typedef __gnuc_va_list va_list; +# 28 "../../GCC/gcc/system.h" 2 +# 38 "../../GCC/gcc/system.h" +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 152 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 3 4 +typedef int ptrdiff_t; +# 214 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 3 4 +typedef unsigned int size_t; +# 326 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 3 4 +typedef long int wchar_t; +# 39 "../../GCC/gcc/system.h" 2 + + +# 1 "/usr/include/stdio.h" 1 3 4 +# 28 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 329 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 313 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 314 "/usr/include/sys/cdefs.h" 2 3 4 +# 330 "/usr/include/features.h" 2 3 4 +# 352 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + +# 1 "/usr/include/gnu/stubs-32.h" 1 3 4 +# 8 "/usr/include/gnu/stubs.h" 2 3 4 +# 353 "/usr/include/features.h" 2 3 4 +# 29 "/usr/include/stdio.h" 2 3 4 + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 32 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 134 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 135 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; +# 37 "/usr/include/stdio.h" 2 3 4 + + + + + + + + + +typedef struct _IO_FILE FILE; + + + + + +# 62 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 72 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 14 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 355 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 3 4 +typedef unsigned int wint_t; +# 15 "/usr/include/_G_config.h" 2 3 4 +# 24 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/include/wchar.h" 1 3 4 +# 48 "/usr/include/wchar.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 49 "/usr/include/wchar.h" 2 3 4 + +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 51 "/usr/include/wchar.h" 2 3 4 +# 76 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + wint_t __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +# 25 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 44 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/include/gconv.h" 1 3 4 +# 28 "/usr/include/gconv.h" 3 4 +# 1 "/usr/include/wchar.h" 1 3 4 +# 48 "/usr/include/wchar.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 49 "/usr/include/wchar.h" 2 3 4 +# 29 "/usr/include/gconv.h" 2 3 4 + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 32 "/usr/include/gconv.h" 2 3 4 + + + + + +enum +{ + __GCONV_OK = 0, + __GCONV_NOCONV, + __GCONV_NODB, + __GCONV_NOMEM, + + __GCONV_EMPTY_INPUT, + __GCONV_FULL_OUTPUT, + __GCONV_ILLEGAL_INPUT, + __GCONV_INCOMPLETE_INPUT, + + __GCONV_ILLEGAL_DESCRIPTOR, + __GCONV_INTERNAL_ERROR +}; + + + +enum +{ + __GCONV_IS_LAST = 0x0001, + __GCONV_IGNORE_ERRORS = 0x0002 +}; + + + +struct __gconv_step; +struct __gconv_step_data; +struct __gconv_loaded_object; +struct __gconv_trans_data; + + + +typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, + __const unsigned char **, __const unsigned char *, + unsigned char **, size_t *, int, int); + + +typedef wint_t (*__gconv_btowc_fct) (struct __gconv_step *, unsigned char); + + +typedef int (*__gconv_init_fct) (struct __gconv_step *); +typedef void (*__gconv_end_fct) (struct __gconv_step *); + + + +typedef int (*__gconv_trans_fct) (struct __gconv_step *, + struct __gconv_step_data *, void *, + __const unsigned char *, + __const unsigned char **, + __const unsigned char *, unsigned char **, + size_t *); + + +typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, + __const unsigned char *, + unsigned char *, unsigned char *); + + +typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, + size_t *); + + +typedef int (*__gconv_trans_init_fct) (void **, const char *); +typedef void (*__gconv_trans_end_fct) (void *); + +struct __gconv_trans_data +{ + + __gconv_trans_fct __trans_fct; + __gconv_trans_context_fct __trans_context_fct; + __gconv_trans_end_fct __trans_end_fct; + void *__data; + struct __gconv_trans_data *__next; +}; + + + +struct __gconv_step +{ + struct __gconv_loaded_object *__shlib_handle; + __const char *__modname; + + int __counter; + + char *__from_name; + char *__to_name; + + __gconv_fct __fct; + __gconv_btowc_fct __btowc_fct; + __gconv_init_fct __init_fct; + __gconv_end_fct __end_fct; + + + + int __min_needed_from; + int __max_needed_from; + int __min_needed_to; + int __max_needed_to; + + + int __stateful; + + void *__data; +}; + + + +struct __gconv_step_data +{ + unsigned char *__outbuf; + unsigned char *__outbufend; + + + + int __flags; + + + + int __invocation_counter; + + + + int __internal_use; + + __mbstate_t *__statep; + __mbstate_t __state; + + + + struct __gconv_trans_data *__trans; +}; + + + +typedef struct __gconv_info +{ + size_t __nsteps; + struct __gconv_step *__steps; + __extension__ struct __gconv_step_data __data []; +} *__gconv_t; +# 45 "/usr/include/_G_config.h" 2 3 4 +typedef union +{ + struct __gconv_info __cd; + struct + { + struct __gconv_info __cd; + struct __gconv_step_data __data; + } __combined; +} _G_iconv_t; + +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 166 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 176 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 199 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 267 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 315 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 324 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 360 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + + + + +extern int __underflow (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int __uflow (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int __overflow (_IO_FILE *, int) __attribute__ ((__nothrow__)); +extern wint_t __wunderflow (_IO_FILE *) __attribute__ ((__nothrow__)); +extern wint_t __wuflow (_IO_FILE *) __attribute__ ((__nothrow__)); +extern wint_t __woverflow (_IO_FILE *, wint_t) __attribute__ ((__nothrow__)); +# 450 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_putc (int __c, _IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +# 480 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t) __attribute__ ((__nothrow__)); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t) __attribute__ ((__nothrow__)); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int) __attribute__ ((__nothrow__)); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int) __attribute__ ((__nothrow__)); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +# 73 "/usr/include/stdio.h" 2 3 4 +# 86 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 138 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 139 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); + + + + + + + + +extern FILE *tmpfile (void); +# 181 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void); + + + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)); + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)); +# 203 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 228 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 238 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream); +# 269 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)); + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) __attribute__ ((__nothrow__)); + + + + +extern FILE *open_memstream (char **__restrict __bufloc, + size_t *__restrict __sizeloc) __attribute__ ((__nothrow__)); + + + +extern FILE *open_wmemstream (wchar_t **__restrict __bufloc, + size_t *__restrict __sizeloc) __attribute__ ((__nothrow__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) ; + + + + +extern int scanf (__const char *__restrict __format, ...) ; + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) ; + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) ; + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 466 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 477 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 510 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + ; + + + + + + +extern char *gets (char *__s) ; + +# 556 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) ; +# 572 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) ; + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) ; + +# 633 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 644 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) ; + + + + +extern void rewind (FILE *__stream); + +# 680 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) ; +# 699 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 722 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) ; +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) ; + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 761 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) ; + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) ; +# 780 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) ; + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) ; + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +# 850 "/usr/include/stdio.h" 3 4 + +# 42 "../../GCC/gcc/system.h" 2 +# 179 "../../GCC/gcc/system.h" +# 1 "../../GCC/gcc/../include/safe-ctype.h" 1 +# 61 "../../GCC/gcc/../include/safe-ctype.h" +enum { + + _sch_isblank = 0x0001, + _sch_iscntrl = 0x0002, + _sch_isdigit = 0x0004, + _sch_islower = 0x0008, + _sch_isprint = 0x0010, + _sch_ispunct = 0x0020, + _sch_isspace = 0x0040, + _sch_isupper = 0x0080, + _sch_isxdigit = 0x0100, + + + _sch_isidst = 0x0200, + _sch_isvsp = 0x0400, + _sch_isnvsp = 0x0800, + + + _sch_isalpha = _sch_isupper|_sch_islower, + _sch_isalnum = _sch_isalpha|_sch_isdigit, + _sch_isidnum = _sch_isidst|_sch_isdigit, + _sch_isgraph = _sch_isalnum|_sch_ispunct, + _sch_iscppsp = _sch_isvsp|_sch_isnvsp, + _sch_isbasic = _sch_isprint|_sch_iscppsp + +}; + + +extern const unsigned short _sch_istable[256]; +# 114 "../../GCC/gcc/../include/safe-ctype.h" +extern const unsigned char _sch_toupper[256]; +extern const unsigned char _sch_tolower[256]; +# 180 "../../GCC/gcc/system.h" 2 + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 29 "/usr/include/sys/types.h" 3 4 + + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __pid_t pid_t; + + + + +typedef __id_t id_t; + + + + +typedef __ssize_t ssize_t; + + + + + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 59 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 75 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 93 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 105 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 195 "/usr/include/sys/types.h" 3 4 +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 217 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 218 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 23 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 121 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 69 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 + +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 29 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); + + +__extension__ extern __inline unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 262 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 36 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + + + unsigned int __flags; + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 271 "/usr/include/sys/types.h" 2 3 4 + + + +# 182 "../../GCC/gcc/system.h" 2 + +# 1 "/usr/include/errno.h" 1 3 4 +# 32 "/usr/include/errno.h" 3 4 + + + + +# 1 "/usr/include/bits/errno.h" 1 3 4 +# 25 "/usr/include/bits/errno.h" 3 4 +# 1 "/usr/include/linux/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm/errno.h" 1 3 4 +# 5 "/usr/include/linux/errno.h" 2 3 4 +# 26 "/usr/include/bits/errno.h" 2 3 4 +# 43 "/usr/include/bits/errno.h" 3 4 +extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +# 37 "/usr/include/errno.h" 2 3 4 +# 55 "/usr/include/errno.h" 3 4 +extern char *program_invocation_name, *program_invocation_short_name; + + + + +# 69 "/usr/include/errno.h" 3 4 +typedef int error_t; +# 184 "../../GCC/gcc/system.h" 2 +# 194 "../../GCC/gcc/system.h" +# 1 "/usr/include/string.h" 1 3 4 +# 28 "/usr/include/string.h" 3 4 + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 34 "/usr/include/string.h" 2 3 4 + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; +# 119 "/usr/include/string.h" 2 3 4 + + +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 165 "/usr/include/string.h" 3 4 + + +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + + + +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); + +# 281 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 426 "/usr/include/string.h" 3 4 + +# 195 "../../GCC/gcc/system.h" 2 +# 1 "/usr/include/strings.h" 1 3 4 +# 196 "../../GCC/gcc/system.h" 2 +# 207 "../../GCC/gcc/system.h" +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 34 "/usr/include/stdlib.h" 2 3 4 + + + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 67 "/usr/include/bits/waitstatus.h" 3 4 +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 68 "/usr/include/stdlib.h" 3 4 +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) ; + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +# 240 "/usr/include/stdlib.h" 3 4 +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) ; + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; + + + + + + +extern double __strtod_internal (__const char *__restrict __nptr, + char **__restrict __endptr, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +extern float __strtof_internal (__const char *__restrict __nptr, + char **__restrict __endptr, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +extern long double __strtold_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + +extern long int __strtol_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern unsigned long int __strtoul_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 429 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) ; + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +# 445 "/usr/include/stdlib.h" 3 4 +extern long int random (void) __attribute__ ((__nothrow__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); + + + + + + +# 613 "/usr/include/stdlib.h" 2 3 4 + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__)); +# 698 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 709 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; +# 719 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; +# 729 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + + + + +extern int system (__const char *__command) ; + + + + + + + +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 757 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) ; + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) ; + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + + + +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) ; + +# 822 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) ; + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) ; + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) ; + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) ; + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 910 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) ; + + + + + +extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) ; + + + + + + + +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); + + + +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); + + + + +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) ; + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 978 "/usr/include/stdlib.h" 3 4 + +# 208 "../../GCC/gcc/system.h" 2 +# 232 "../../GCC/gcc/system.h" +# 1 "/usr/include/unistd.h" 1 3 4 +# 28 "/usr/include/unistd.h" 3 4 + +# 171 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/posix_opt.h" 1 3 4 +# 172 "/usr/include/unistd.h" 2 3 4 + + + +# 1 "/usr/include/bits/environments.h" 1 3 4 +# 176 "/usr/include/unistd.h" 2 3 4 +# 195 "/usr/include/unistd.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 196 "/usr/include/unistd.h" 2 3 4 +# 236 "/usr/include/unistd.h" 3 4 +typedef __intptr_t intptr_t; + + + + + + +typedef __socklen_t socklen_t; +# 256 "/usr/include/unistd.h" 3 4 +extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (__const char *__name, int __type) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (__const char *__name, int __type) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; +# 299 "/usr/include/unistd.h" 3 4 +extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__)); +# 310 "/usr/include/unistd.h" 3 4 +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + __attribute__ ((__nothrow__)); + + + + + + +extern int close (int __fd); + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; + + + + + +extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; +# 341 "/usr/include/unistd.h" 3 4 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) ; + + + + + + +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) ; +# 369 "/usr/include/unistd.h" 3 4 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) ; + + +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) ; + + + + + + + +extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) ; +# 391 "/usr/include/unistd.h" 3 4 +extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); +# 403 "/usr/include/unistd.h" 3 4 +extern unsigned int sleep (unsigned int __seconds); + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + __attribute__ ((__nothrow__)); + + + + + + +extern int usleep (__useconds_t __useconds); +# 427 "/usr/include/unistd.h" 3 4 +extern int pause (void); + + + +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) ; + + + + +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + + +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; + + + +extern int chdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern int fchdir (int __fd) __attribute__ ((__nothrow__)) ; +# 469 "/usr/include/unistd.h" 3 4 +extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) ; + + + + + +extern char *get_current_dir_name (void) __attribute__ ((__nothrow__)); + + + + + + +extern char *getwd (char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; + + + + +extern int dup (int __fd) __attribute__ ((__nothrow__)) ; + + +extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__)); + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + __attribute__ ((__nothrow__)); + + + + +extern int execv (__const char *__path, char *__const __argv[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int execle (__const char *__path, __const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int execl (__const char *__path, __const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int execvp (__const char *__file, char *__const __argv[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int execlp (__const char *__file, __const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int nice (int __inc) __attribute__ ((__nothrow__)) ; + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/confname.h" 1 3 4 +# 26 "/usr/include/bits/confname.h" 3 4 +enum + { + _PC_LINK_MAX, + + _PC_MAX_CANON, + + _PC_MAX_INPUT, + + _PC_NAME_MAX, + + _PC_PATH_MAX, + + _PC_PIPE_BUF, + + _PC_CHOWN_RESTRICTED, + + _PC_NO_TRUNC, + + _PC_VDISABLE, + + _PC_SYNC_IO, + + _PC_ASYNC_IO, + + _PC_PRIO_IO, + + _PC_SOCK_MAXBUF, + + _PC_FILESIZEBITS, + + _PC_REC_INCR_XFER_SIZE, + + _PC_REC_MAX_XFER_SIZE, + + _PC_REC_MIN_XFER_SIZE, + + _PC_REC_XFER_ALIGN, + + _PC_ALLOC_SIZE_MIN, + + _PC_SYMLINK_MAX, + + _PC_2_SYMLINKS + + }; + + +enum + { + _SC_ARG_MAX, + + _SC_CHILD_MAX, + + _SC_CLK_TCK, + + _SC_NGROUPS_MAX, + + _SC_OPEN_MAX, + + _SC_STREAM_MAX, + + _SC_TZNAME_MAX, + + _SC_JOB_CONTROL, + + _SC_SAVED_IDS, + + _SC_REALTIME_SIGNALS, + + _SC_PRIORITY_SCHEDULING, + + _SC_TIMERS, + + _SC_ASYNCHRONOUS_IO, + + _SC_PRIORITIZED_IO, + + _SC_SYNCHRONIZED_IO, + + _SC_FSYNC, + + _SC_MAPPED_FILES, + + _SC_MEMLOCK, + + _SC_MEMLOCK_RANGE, + + _SC_MEMORY_PROTECTION, + + _SC_MESSAGE_PASSING, + + _SC_SEMAPHORES, + + _SC_SHARED_MEMORY_OBJECTS, + + _SC_AIO_LISTIO_MAX, + + _SC_AIO_MAX, + + _SC_AIO_PRIO_DELTA_MAX, + + _SC_DELAYTIMER_MAX, + + _SC_MQ_OPEN_MAX, + + _SC_MQ_PRIO_MAX, + + _SC_VERSION, + + _SC_PAGESIZE, + + + _SC_RTSIG_MAX, + + _SC_SEM_NSEMS_MAX, + + _SC_SEM_VALUE_MAX, + + _SC_SIGQUEUE_MAX, + + _SC_TIMER_MAX, + + + + + _SC_BC_BASE_MAX, + + _SC_BC_DIM_MAX, + + _SC_BC_SCALE_MAX, + + _SC_BC_STRING_MAX, + + _SC_COLL_WEIGHTS_MAX, + + _SC_EQUIV_CLASS_MAX, + + _SC_EXPR_NEST_MAX, + + _SC_LINE_MAX, + + _SC_RE_DUP_MAX, + + _SC_CHARCLASS_NAME_MAX, + + + _SC_2_VERSION, + + _SC_2_C_BIND, + + _SC_2_C_DEV, + + _SC_2_FORT_DEV, + + _SC_2_FORT_RUN, + + _SC_2_SW_DEV, + + _SC_2_LOCALEDEF, + + + _SC_PII, + + _SC_PII_XTI, + + _SC_PII_SOCKET, + + _SC_PII_INTERNET, + + _SC_PII_OSI, + + _SC_POLL, + + _SC_SELECT, + + _SC_UIO_MAXIOV, + + _SC_IOV_MAX = _SC_UIO_MAXIOV, + + _SC_PII_INTERNET_STREAM, + + _SC_PII_INTERNET_DGRAM, + + _SC_PII_OSI_COTS, + + _SC_PII_OSI_CLTS, + + _SC_PII_OSI_M, + + _SC_T_IOV_MAX, + + + + _SC_THREADS, + + _SC_THREAD_SAFE_FUNCTIONS, + + _SC_GETGR_R_SIZE_MAX, + + _SC_GETPW_R_SIZE_MAX, + + _SC_LOGIN_NAME_MAX, + + _SC_TTY_NAME_MAX, + + _SC_THREAD_DESTRUCTOR_ITERATIONS, + + _SC_THREAD_KEYS_MAX, + + _SC_THREAD_STACK_MIN, + + _SC_THREAD_THREADS_MAX, + + _SC_THREAD_ATTR_STACKADDR, + + _SC_THREAD_ATTR_STACKSIZE, + + _SC_THREAD_PRIORITY_SCHEDULING, + + _SC_THREAD_PRIO_INHERIT, + + _SC_THREAD_PRIO_PROTECT, + + _SC_THREAD_PROCESS_SHARED, + + + _SC_NPROCESSORS_CONF, + + _SC_NPROCESSORS_ONLN, + + _SC_PHYS_PAGES, + + _SC_AVPHYS_PAGES, + + _SC_ATEXIT_MAX, + + _SC_PASS_MAX, + + + _SC_XOPEN_VERSION, + + _SC_XOPEN_XCU_VERSION, + + _SC_XOPEN_UNIX, + + _SC_XOPEN_CRYPT, + + _SC_XOPEN_ENH_I18N, + + _SC_XOPEN_SHM, + + + _SC_2_CHAR_TERM, + + _SC_2_C_VERSION, + + _SC_2_UPE, + + + _SC_XOPEN_XPG2, + + _SC_XOPEN_XPG3, + + _SC_XOPEN_XPG4, + + + _SC_CHAR_BIT, + + _SC_CHAR_MAX, + + _SC_CHAR_MIN, + + _SC_INT_MAX, + + _SC_INT_MIN, + + _SC_LONG_BIT, + + _SC_WORD_BIT, + + _SC_MB_LEN_MAX, + + _SC_NZERO, + + _SC_SSIZE_MAX, + + _SC_SCHAR_MAX, + + _SC_SCHAR_MIN, + + _SC_SHRT_MAX, + + _SC_SHRT_MIN, + + _SC_UCHAR_MAX, + + _SC_UINT_MAX, + + _SC_ULONG_MAX, + + _SC_USHRT_MAX, + + + _SC_NL_ARGMAX, + + _SC_NL_LANGMAX, + + _SC_NL_MSGMAX, + + _SC_NL_NMAX, + + _SC_NL_SETMAX, + + _SC_NL_TEXTMAX, + + + _SC_XBS5_ILP32_OFF32, + + _SC_XBS5_ILP32_OFFBIG, + + _SC_XBS5_LP64_OFF64, + + _SC_XBS5_LPBIG_OFFBIG, + + + _SC_XOPEN_LEGACY, + + _SC_XOPEN_REALTIME, + + _SC_XOPEN_REALTIME_THREADS, + + + _SC_ADVISORY_INFO, + + _SC_BARRIERS, + + _SC_BASE, + + _SC_C_LANG_SUPPORT, + + _SC_C_LANG_SUPPORT_R, + + _SC_CLOCK_SELECTION, + + _SC_CPUTIME, + + _SC_THREAD_CPUTIME, + + _SC_DEVICE_IO, + + _SC_DEVICE_SPECIFIC, + + _SC_DEVICE_SPECIFIC_R, + + _SC_FD_MGMT, + + _SC_FIFO, + + _SC_PIPE, + + _SC_FILE_ATTRIBUTES, + + _SC_FILE_LOCKING, + + _SC_FILE_SYSTEM, + + _SC_MONOTONIC_CLOCK, + + _SC_MULTI_PROCESS, + + _SC_SINGLE_PROCESS, + + _SC_NETWORKING, + + _SC_READER_WRITER_LOCKS, + + _SC_SPIN_LOCKS, + + _SC_REGEXP, + + _SC_REGEX_VERSION, + + _SC_SHELL, + + _SC_SIGNALS, + + _SC_SPAWN, + + _SC_SPORADIC_SERVER, + + _SC_THREAD_SPORADIC_SERVER, + + _SC_SYSTEM_DATABASE, + + _SC_SYSTEM_DATABASE_R, + + _SC_TIMEOUTS, + + _SC_TYPED_MEMORY_OBJECTS, + + _SC_USER_GROUPS, + + _SC_USER_GROUPS_R, + + _SC_2_PBS, + + _SC_2_PBS_ACCOUNTING, + + _SC_2_PBS_LOCATE, + + _SC_2_PBS_MESSAGE, + + _SC_2_PBS_TRACK, + + _SC_SYMLOOP_MAX, + + _SC_STREAMS, + + _SC_2_PBS_CHECKPOINT, + + + _SC_V6_ILP32_OFF32, + + _SC_V6_ILP32_OFFBIG, + + _SC_V6_LP64_OFF64, + + _SC_V6_LPBIG_OFFBIG, + + + _SC_HOST_NAME_MAX, + + _SC_TRACE, + + _SC_TRACE_EVENT_FILTER, + + _SC_TRACE_INHERIT, + + _SC_TRACE_LOG, + + + _SC_LEVEL1_ICACHE_SIZE, + + _SC_LEVEL1_ICACHE_ASSOC, + + _SC_LEVEL1_ICACHE_LINESIZE, + + _SC_LEVEL1_DCACHE_SIZE, + + _SC_LEVEL1_DCACHE_ASSOC, + + _SC_LEVEL1_DCACHE_LINESIZE, + + _SC_LEVEL2_CACHE_SIZE, + + _SC_LEVEL2_CACHE_ASSOC, + + _SC_LEVEL2_CACHE_LINESIZE, + + _SC_LEVEL3_CACHE_SIZE, + + _SC_LEVEL3_CACHE_ASSOC, + + _SC_LEVEL3_CACHE_LINESIZE, + + _SC_LEVEL4_CACHE_SIZE, + + _SC_LEVEL4_CACHE_ASSOC, + + _SC_LEVEL4_CACHE_LINESIZE, + + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + + _SC_RAW_SOCKETS + + }; + + +enum + { + _CS_PATH, + + + _CS_V6_WIDTH_RESTRICTED_ENVS, + + + _CS_GNU_LIBC_VERSION, + + _CS_GNU_LIBPTHREAD_VERSION, + + + _CS_LFS_CFLAGS = 1000, + + _CS_LFS_LDFLAGS, + + _CS_LFS_LIBS, + + _CS_LFS_LINTFLAGS, + + _CS_LFS64_CFLAGS, + + _CS_LFS64_LDFLAGS, + + _CS_LFS64_LIBS, + + _CS_LFS64_LINTFLAGS, + + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + + _CS_XBS5_ILP32_OFF32_LDFLAGS, + + _CS_XBS5_ILP32_OFF32_LIBS, + + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LIBS, + + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + + _CS_XBS5_LP64_OFF64_CFLAGS, + + _CS_XBS5_LP64_OFF64_LDFLAGS, + + _CS_XBS5_LP64_OFF64_LIBS, + + _CS_XBS5_LP64_OFF64_LINTFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LIBS, + + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LIBS, + + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LIBS, + + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + + }; +# 553 "/usr/include/unistd.h" 2 3 4 + + +extern long int pathconf (__const char *__path, int __name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__)); + + +extern long int sysconf (int __name) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__)); + + + + +extern __pid_t getpid (void) __attribute__ ((__nothrow__)); + + +extern __pid_t getppid (void) __attribute__ ((__nothrow__)); + + + + +extern __pid_t getpgrp (void) __attribute__ ((__nothrow__)); +# 589 "/usr/include/unistd.h" 3 4 +extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); + +extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__)); +# 615 "/usr/include/unistd.h" 3 4 +extern int setpgrp (void) __attribute__ ((__nothrow__)); +# 632 "/usr/include/unistd.h" 3 4 +extern __pid_t setsid (void) __attribute__ ((__nothrow__)); + + + +extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__)); + + + +extern __uid_t getuid (void) __attribute__ ((__nothrow__)); + + +extern __uid_t geteuid (void) __attribute__ ((__nothrow__)); + + +extern __gid_t getgid (void) __attribute__ ((__nothrow__)); + + +extern __gid_t getegid (void) __attribute__ ((__nothrow__)); + + + + +extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) ; + + + +extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__)); + + + + + + +extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__)); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__)); + + + + +extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__)); + + + + + + +extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__)); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__)); + + + + +extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__)); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + __attribute__ ((__nothrow__)); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + __attribute__ ((__nothrow__)); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + __attribute__ ((__nothrow__)); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + __attribute__ ((__nothrow__)); + + + + + + +extern __pid_t fork (void) __attribute__ ((__nothrow__)); + + + + + + +extern __pid_t vfork (void) __attribute__ ((__nothrow__)); + + + + + +extern char *ttyname (int __fd) __attribute__ ((__nothrow__)); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; + + + +extern int isatty (int __fd) __attribute__ ((__nothrow__)); + + + + + +extern int ttyslot (void) __attribute__ ((__nothrow__)); + + + + +extern int link (__const char *__from, __const char *__to) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; + + + + +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) ; + + + + +extern int symlink (__const char *__from, __const char *__to) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; + + + + +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) ; + + + + +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) ; + + +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) ; + + + +extern int unlink (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, __const char *__name, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__)); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__)); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); + + + + +extern int setlogin (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 835 "/usr/include/unistd.h" 3 4 +# 1 "../../GCC/gcc/../include/getopt.h" 1 3 4 +# 36 "../../GCC/gcc/../include/getopt.h" 3 4 +extern char *optarg; +# 50 "../../GCC/gcc/../include/getopt.h" 3 4 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 82 "../../GCC/gcc/../include/getopt.h" 3 4 +struct option +{ + + const char *name; + + + + + + int has_arg; + int *flag; + int val; +}; +# 113 "../../GCC/gcc/../include/getopt.h" 3 4 +extern int getopt (int argc, char *const *argv, const char *shortopts); + + + + + + + +extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); +extern int getopt_long_only (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind); + + +extern int _getopt_internal (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind, + int long_only); +# 836 "/usr/include/unistd.h" 2 3 4 + + + + + + + +extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sethostname (__const char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern int sethostid (long int __id) __attribute__ ((__nothrow__)) ; + + + + + +extern int getdomainname (char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +extern int setdomainname (__const char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + +extern int vhangup (void) __attribute__ ((__nothrow__)); + + +extern int revoke (__const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (__const char *__name) __attribute__ ((__nothrow__)); + + + +extern char *getusershell (void) __attribute__ ((__nothrow__)); +extern void endusershell (void) __attribute__ ((__nothrow__)); +extern void setusershell (void) __attribute__ ((__nothrow__)); + + + + + +extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) ; + + + + + + +extern int chroot (__const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; + + + +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +# 921 "/usr/include/unistd.h" 3 4 +extern int fsync (int __fd); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) __attribute__ ((__nothrow__)); + + + + +extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) __attribute__ ((__nothrow__)); + + + + +extern int truncate (__const char *__file, __off_t __length) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 958 "/usr/include/unistd.h" 3 4 +extern int truncate64 (__const char *__file, __off64_t __length) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) ; +# 968 "/usr/include/unistd.h" 3 4 +extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__)) ; +# 978 "/usr/include/unistd.h" 3 4 +extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__)) ; +# 988 "/usr/include/unistd.h" 3 4 +extern int brk (void *__addr) __attribute__ ((__nothrow__)) ; + + + + + +extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); +# 1009 "/usr/include/unistd.h" 3 4 +extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); +# 1032 "/usr/include/unistd.h" 3 4 +extern int lockf (int __fd, int __cmd, __off_t __len) ; +# 1042 "/usr/include/unistd.h" 3 4 +extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; +# 1063 "/usr/include/unistd.h" 3 4 +extern int fdatasync (int __fildes) __attribute__ ((__nothrow__)); + + + + + + + +extern char *crypt (__const char *__key, __const char *__salt) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); +# 1101 "/usr/include/unistd.h" 3 4 + +# 233 "../../GCC/gcc/system.h" 2 + + + +# 1 "/usr/include/sys/param.h" 1 3 4 +# 22 "/usr/include/sys/param.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 1 3 4 +# 11 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 1 3 4 +# 122 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 153 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 36 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 37 "/usr/include/bits/local_lim.h" 2 3 4 +# 154 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 123 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/syslimits.h" 2 3 4 +# 12 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 2 3 4 +# 23 "/usr/include/sys/param.h" 2 3 4 + +# 1 "/usr/include/linux/param.h" 1 3 4 + + + +# 1 "/usr/include/asm/param.h" 1 3 4 +# 5 "/usr/include/linux/param.h" 2 3 4 +# 25 "/usr/include/sys/param.h" 2 3 4 +# 237 "../../GCC/gcc/system.h" 2 + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/limits.h" 1 3 4 +# 243 "../../GCC/gcc/system.h" 2 + + + +# 1 "../../GCC/gcc/hwint.h" 1 +# 247 "../../GCC/gcc/system.h" 2 +# 275 "../../GCC/gcc/system.h" +# 1 "/usr/include/sys/time.h" 1 3 4 +# 27 "/usr/include/sys/time.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 28 "/usr/include/sys/time.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 30 "/usr/include/sys/time.h" 2 3 4 +# 39 "/usr/include/sys/time.h" 3 4 + +# 57 "/usr/include/sys/time.h" 3 4 +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; + +typedef struct timezone *__restrict __timezone_ptr_t; +# 73 "/usr/include/sys/time.h" 3 4 +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) __attribute__ ((__nothrow__)); + + + + +enum __itimer_which + { + + ITIMER_REAL = 0, + + + ITIMER_VIRTUAL = 1, + + + + ITIMER_PROF = 2 + + }; + + + +struct itimerval + { + + struct timeval it_interval; + + struct timeval it_value; + }; + + + + +typedef enum __itimer_which __itimer_which_t; + + + + + + +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) __attribute__ ((__nothrow__)); + + + + +extern int setitimer (__itimer_which_t __which, + __const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); + + + + +extern int utimes (__const char *__file, __const struct timeval __tvp[2]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); + + + + + + +extern int futimesat (int __fd, __const char *__file, + __const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); +# 191 "/usr/include/sys/time.h" 3 4 + +# 276 "../../GCC/gcc/system.h" 2 +# 1 "/usr/include/time.h" 1 3 4 +# 31 "/usr/include/time.h" 3 4 + + + + + + + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 40 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 44 "/usr/include/time.h" 2 3 4 +# 132 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 181 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) __attribute__ ((__nothrow__)); + + +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); + + +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__)); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) __attribute__ ((__nothrow__)); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); +# 312 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +# 327 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__)); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); + + +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); +# 389 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 398 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 412 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + + +# 277 "../../GCC/gcc/system.h" 2 +# 288 "../../GCC/gcc/system.h" +# 1 "/usr/include/fcntl.h" 1 3 4 +# 30 "/usr/include/fcntl.h" 3 4 + + + + +# 1 "/usr/include/bits/fcntl.h" 1 3 4 +# 138 "/usr/include/bits/fcntl.h" 3 4 +struct flock + { + short int l_type; + short int l_whence; + + __off_t l_start; + __off_t l_len; + + + + + __pid_t l_pid; + }; + + +struct flock64 + { + short int l_type; + short int l_whence; + __off64_t l_start; + __off64_t l_len; + __pid_t l_pid; + }; +# 183 "/usr/include/bits/fcntl.h" 3 4 + + + +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __attribute__ ((__nothrow__)); + + +# 35 "/usr/include/fcntl.h" 2 3 4 + + + +# 1 "/usr/include/sys/stat.h" 1 3 4 +# 103 "/usr/include/sys/stat.h" 3 4 + + +# 1 "/usr/include/bits/stat.h" 1 3 4 +# 36 "/usr/include/bits/stat.h" 3 4 +struct stat + { + __dev_t st_dev; + unsigned short int __pad1; + + __ino_t st_ino; + + + + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned short int __pad2; + + __off_t st_size; + + + + __blksize_t st_blksize; + + + __blkcnt_t st_blocks; +# 70 "/usr/include/bits/stat.h" 3 4 + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 85 "/usr/include/bits/stat.h" 3 4 + unsigned long int __unused4; + unsigned long int __unused5; + + + + }; + + +struct stat64 + { + __dev_t st_dev; + unsigned int __pad1; + + __ino_t __st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned int __pad2; + __off64_t st_size; + __blksize_t st_blksize; + + __blkcnt64_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 127 "/usr/include/bits/stat.h" 3 4 + __ino64_t st_ino; + }; +# 106 "/usr/include/sys/stat.h" 2 3 4 +# 207 "/usr/include/sys/stat.h" 3 4 +extern int stat (__const char *__restrict __file, + struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +# 226 "/usr/include/sys/stat.h" 3 4 +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int fstatat (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +# 250 "/usr/include/sys/stat.h" 3 4 +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + + + + + +extern int lstat (__const char *__restrict __file, + struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +# 272 "/usr/include/sys/stat.h" 3 4 +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int chmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int lchmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__)); + + + + + +extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) ; + + + + + + +extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__)); + + + + +extern __mode_t getumask (void) __attribute__ ((__nothrow__)); + + + +extern int mkdir (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern int mkfifo (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +# 380 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, + struct stat *__stat_buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))); +# 413 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))); + +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5))); + + + + +extern __inline__ int +__attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf) +{ + return __xstat (3, __path, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf) +{ + return __lxstat (3, __path, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (3, __fd, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) + +{ + return __fxstatat (3, __fd, __filename, __statbuf, __flag); +} + + + +extern __inline__ int +__attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev) +{ + return __xmknod (1, __path, __mode, &__dev); +} + + + +extern __inline__ int +__attribute__ ((__nothrow__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) + +{ + return __xmknodat (1, __fd, __path, __mode, &__dev); +} + + + + + +extern __inline__ int +__attribute__ ((__nothrow__)) stat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __xstat64 (3, __path, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) lstat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __lxstat64 (3, __path, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) fstat64 (int __fd, struct stat64 *__statbuf) +{ + return __fxstat64 (3, __fd, __statbuf); +} + + +extern __inline__ int +__attribute__ ((__nothrow__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) + +{ + return __fxstatat64 (3, __fd, __filename, __statbuf, __flag); +} + + + + + + + +# 39 "/usr/include/fcntl.h" 2 3 4 +# 76 "/usr/include/fcntl.h" 3 4 +extern int fcntl (int __fd, int __cmd, ...); +# 85 "/usr/include/fcntl.h" 3 4 +extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +# 95 "/usr/include/fcntl.h" 3 4 +extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +# 109 "/usr/include/fcntl.h" 3 4 +extern int openat (int __fd, __const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +# 120 "/usr/include/fcntl.h" 3 4 +extern int openat64 (int __fd, __const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +# 130 "/usr/include/fcntl.h" 3 4 +extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); +# 140 "/usr/include/fcntl.h" 3 4 +extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); +# 176 "/usr/include/fcntl.h" 3 4 +extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len, + int __advise) __attribute__ ((__nothrow__)); +# 188 "/usr/include/fcntl.h" 3 4 +extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, + int __advise) __attribute__ ((__nothrow__)); +# 198 "/usr/include/fcntl.h" 3 4 +extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len); +# 209 "/usr/include/fcntl.h" 3 4 +extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); + + + + +# 289 "../../GCC/gcc/system.h" 2 +# 326 "../../GCC/gcc/system.h" +# 1 "/usr/include/sys/wait.h" 1 3 4 +# 29 "/usr/include/sys/wait.h" 3 4 + + +# 1 "/usr/include/signal.h" 1 3 4 +# 31 "/usr/include/signal.h" 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 103 "/usr/include/bits/sigset.h" 3 4 +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +# 34 "/usr/include/signal.h" 2 3 4 + + + + + + + +typedef __sig_atomic_t sig_atomic_t; + +# 58 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/signum.h" 1 3 4 +# 59 "/usr/include/signal.h" 2 3 4 +# 75 "/usr/include/signal.h" 3 4 +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); + + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +# 104 "/usr/include/signal.h" 3 4 + + + + + +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); + + + + + + +extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); + + + + +extern int raise (int __sig) __attribute__ ((__nothrow__)); + + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern int gsignal (int __sig) __attribute__ ((__nothrow__)); + + + + +extern void psignal (int __sig, __const char *__s); +# 153 "/usr/include/signal.h" 3 4 +extern int __sigpause (int __sig_or_mask, int __is_sig); +# 162 "/usr/include/signal.h" 3 4 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +# 181 "/usr/include/signal.h" 3 4 +extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +# 196 "/usr/include/signal.h" 3 4 +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; +# 212 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 + + + + + + + +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +# 51 "/usr/include/bits/siginfo.h" 3 4 +typedef struct siginfo + { + int si_signo; + int si_errno; + + int si_code; + + union + { + int _pad[((128 / sizeof (int)) - 3)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +# 129 "/usr/include/bits/siginfo.h" 3 4 +enum +{ + SI_ASYNCNL = -60, + + SI_TKILL = -6, + + SI_SIGIO, + + SI_ASYNCIO, + + SI_MESGQ, + + SI_TIMER, + + SI_QUEUE, + + SI_USER, + + SI_KERNEL = 0x80 + +}; + + + +enum +{ + ILL_ILLOPC = 1, + + ILL_ILLOPN, + + ILL_ILLADR, + + ILL_ILLTRP, + + ILL_PRVOPC, + + ILL_PRVREG, + + ILL_COPROC, + + ILL_BADSTK + +}; + + +enum +{ + FPE_INTDIV = 1, + + FPE_INTOVF, + + FPE_FLTDIV, + + FPE_FLTOVF, + + FPE_FLTUND, + + FPE_FLTRES, + + FPE_FLTINV, + + FPE_FLTSUB + +}; + + +enum +{ + SEGV_MAPERR = 1, + + SEGV_ACCERR + +}; + + +enum +{ + BUS_ADRALN = 1, + + BUS_ADRERR, + + BUS_OBJERR + +}; + + +enum +{ + TRAP_BRKPT = 1, + + TRAP_TRACE + +}; + + +enum +{ + CLD_EXITED = 1, + + CLD_KILLED, + + CLD_DUMPED, + + CLD_TRAPPED, + + CLD_STOPPED, + + CLD_CONTINUED + +}; + + +enum +{ + POLL_IN = 1, + + POLL_OUT, + + POLL_MSG, + + POLL_ERR, + + POLL_PRI, + + POLL_HUP + +}; +# 273 "/usr/include/bits/siginfo.h" 3 4 +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 3)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; + + + + + + +enum +{ + SIGEV_SIGNAL = 0, + + SIGEV_NONE, + + SIGEV_THREAD, + + + SIGEV_THREAD_ID = 4 + +}; +# 213 "/usr/include/signal.h" 2 3 4 + + + +extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (__const sigset_t *__set, int __signo) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/include/bits/sigaction.h" 1 3 4 +# 25 "/usr/include/bits/sigaction.h" 3 4 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + + + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; +# 247 "/usr/include/signal.h" 2 3 4 + + +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); + + + + + + +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); + + +extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); + + + +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + __attribute__ ((__nothrow__)); +# 304 "/usr/include/signal.h" 3 4 +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; + + +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + + int sv_flags; + + }; +# 328 "/usr/include/signal.h" 3 4 +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) __attribute__ ((__nothrow__)); + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 28 "/usr/include/bits/sigcontext.h" 3 4 +# 1 "/usr/include/asm/sigcontext.h" 1 3 4 +# 18 "/usr/include/asm/sigcontext.h" 3 4 +struct _fpreg { + unsigned short significand[4]; + unsigned short exponent; +}; + +struct _fpxreg { + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; + +struct _xmmreg { + unsigned long element[4]; +}; + +struct _fpstate { + + unsigned long cw; + unsigned long sw; + unsigned long tag; + unsigned long ipoff; + unsigned long cssel; + unsigned long dataoff; + unsigned long datasel; + struct _fpreg _st[8]; + unsigned short status; + unsigned short magic; + + + unsigned long _fxsr_env[6]; + unsigned long mxcsr; + unsigned long reserved; + struct _fpxreg _fxsr_st[8]; + struct _xmmreg _xmm[8]; + unsigned long padding[56]; +}; + + + +struct sigcontext { + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long esp; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned short cs, __csh; + unsigned long eflags; + unsigned long esp_at_signal; + unsigned short ss, __ssh; + struct _fpstate * fpstate; + unsigned long oldmask; + unsigned long cr2; +}; +# 29 "/usr/include/bits/sigcontext.h" 2 3 4 +# 334 "/usr/include/signal.h" 2 3 4 + + +extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); +# 346 "/usr/include/signal.h" 3 4 +extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); + +# 1 "/usr/include/bits/sigstack.h" 1 3 4 +# 26 "/usr/include/bits/sigstack.h" 3 4 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; + + + +enum +{ + SS_ONSTACK = 1, + + SS_DISABLE + +}; +# 50 "/usr/include/bits/sigstack.h" 3 4 +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 349 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/sys/ucontext.h" 1 3 4 +# 23 "/usr/include/sys/ucontext.h" 3 4 +# 1 "/usr/include/signal.h" 1 3 4 +# 24 "/usr/include/sys/ucontext.h" 2 3 4 + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 28 "/usr/include/sys/ucontext.h" 2 3 4 + + + +typedef int greg_t; + + + + + +typedef greg_t gregset_t[19]; + + + +enum +{ + REG_GS = 0, + + REG_FS, + + REG_ES, + + REG_DS, + + REG_EDI, + + REG_ESI, + + REG_EBP, + + REG_ESP, + + REG_EBX, + + REG_EDX, + + REG_ECX, + + REG_EAX, + + REG_TRAPNO, + + REG_ERR, + + REG_EIP, + + REG_CS, + + REG_EFL, + + REG_UESP, + + REG_SS + +}; + + + +struct _libc_fpreg +{ + unsigned short int significand[4]; + unsigned short int exponent; +}; + +struct _libc_fpstate +{ + unsigned long int cw; + unsigned long int sw; + unsigned long int tag; + unsigned long int ipoff; + unsigned long int cssel; + unsigned long int dataoff; + unsigned long int datasel; + struct _libc_fpreg _st[8]; + unsigned long int status; +}; + + +typedef struct _libc_fpstate *fpregset_t; + + +typedef struct + { + gregset_t gregs; + + + fpregset_t fpregs; + unsigned long int oldmask; + unsigned long int cr2; + } mcontext_t; + + +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +# 352 "/usr/include/signal.h" 2 3 4 + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); + + + +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); + + + + + + + +extern int sighold (int __sig) __attribute__ ((__nothrow__)); + + +extern int sigrelse (int __sig) __attribute__ ((__nothrow__)); + + +extern int sigignore (int __sig) __attribute__ ((__nothrow__)); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__)); + + + + + + +# 1 "/usr/include/bits/sigthread.h" 1 3 4 +# 31 "/usr/include/bits/sigthread.h" 3 4 +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); + + +extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); +# 388 "/usr/include/signal.h" 2 3 4 + + + + + + +extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); + +extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); + + + + +# 32 "/usr/include/sys/wait.h" 2 3 4 +# 1 "/usr/include/sys/resource.h" 1 3 4 +# 25 "/usr/include/sys/resource.h" 3 4 +# 1 "/usr/include/bits/resource.h" 1 3 4 +# 33 "/usr/include/bits/resource.h" 3 4 +enum __rlimit_resource +{ + + RLIMIT_CPU = 0, + + + + RLIMIT_FSIZE = 1, + + + + RLIMIT_DATA = 2, + + + + RLIMIT_STACK = 3, + + + + RLIMIT_CORE = 4, + + + + + + + __RLIMIT_RSS = 5, + + + + RLIMIT_NOFILE = 7, + __RLIMIT_OFILE = RLIMIT_NOFILE, + + + + + RLIMIT_AS = 9, + + + + __RLIMIT_NPROC = 6, + + + + __RLIMIT_MEMLOCK = 8, + + + + __RLIMIT_LOCKS = 10, + + + + __RLIMIT_SIGPENDING = 11, + + + + __RLIMIT_MSGQUEUE = 12, + + + + + + __RLIMIT_NICE = 13, + + + + + __RLIMIT_RTPRIO = 14, + + + __RLIMIT_NLIMITS = 15, + __RLIM_NLIMITS = __RLIMIT_NLIMITS + + +}; +# 127 "/usr/include/bits/resource.h" 3 4 +typedef __rlim_t rlim_t; + + + + +typedef __rlim64_t rlim64_t; + + +struct rlimit + { + + rlim_t rlim_cur; + + rlim_t rlim_max; + }; + + +struct rlimit64 + { + + rlim64_t rlim_cur; + + rlim64_t rlim_max; + }; + + + +enum __rusage_who +{ + + RUSAGE_SELF = 0, + + + + RUSAGE_CHILDREN = -1 + +}; + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 167 "/usr/include/bits/resource.h" 2 3 4 + + +struct rusage + { + + struct timeval ru_utime; + + struct timeval ru_stime; + + long int ru_maxrss; + + + long int ru_ixrss; + + long int ru_idrss; + + long int ru_isrss; + + + long int ru_minflt; + + long int ru_majflt; + + long int ru_nswap; + + + long int ru_inblock; + + long int ru_oublock; + + long int ru_msgsnd; + + long int ru_msgrcv; + + long int ru_nsignals; + + + + long int ru_nvcsw; + + + long int ru_nivcsw; + }; + + + + + + + +enum __priority_which +{ + PRIO_PROCESS = 0, + + PRIO_PGRP = 1, + + PRIO_USER = 2 + +}; +# 26 "/usr/include/sys/resource.h" 2 3 4 + + + + + + + + + + + + + +typedef enum __rlimit_resource __rlimit_resource_t; +typedef enum __rusage_who __rusage_who_t; +typedef enum __priority_which __priority_which_t; +# 51 "/usr/include/sys/resource.h" 3 4 +extern int getrlimit (__rlimit_resource_t __resource, + struct rlimit *__rlimits) __attribute__ ((__nothrow__)); +# 62 "/usr/include/sys/resource.h" 3 4 +extern int getrlimit64 (__rlimit_resource_t __resource, + struct rlimit64 *__rlimits) __attribute__ ((__nothrow__)); + + + + + + +extern int setrlimit (__rlimit_resource_t __resource, + __const struct rlimit *__rlimits) __attribute__ ((__nothrow__)); +# 82 "/usr/include/sys/resource.h" 3 4 +extern int setrlimit64 (__rlimit_resource_t __resource, + __const struct rlimit64 *__rlimits) __attribute__ ((__nothrow__)); + + + + +extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__)); + + + + + +extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__)); + + + +extern int setpriority (__priority_which_t __which, id_t __who, int __prio) + __attribute__ ((__nothrow__)); + + +# 33 "/usr/include/sys/wait.h" 2 3 4 +# 102 "/usr/include/sys/wait.h" 3 4 +typedef enum +{ + P_ALL, + P_PID, + P_PGID +} idtype_t; +# 116 "/usr/include/sys/wait.h" 3 4 +extern __pid_t wait (__WAIT_STATUS __stat_loc); +# 139 "/usr/include/sys/wait.h" 3 4 +extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); + + + +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 +# 144 "/usr/include/sys/wait.h" 2 3 4 +# 155 "/usr/include/sys/wait.h" 3 4 +extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, + int __options); + + + + + +struct rusage; + + + + + + +extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, + struct rusage * __usage) __attribute__ ((__nothrow__)); + + + + + +struct rusage; + + +extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, + struct rusage *__usage) __attribute__ ((__nothrow__)); + + + + +# 327 "../../GCC/gcc/system.h" 2 +# 377 "../../GCC/gcc/system.h" +extern int getopt (int, char * const *, const char *); +# 397 "../../GCC/gcc/system.h" +# 1 "/usr/include/malloc.h" 1 3 4 +# 24 "/usr/include/malloc.h" 3 4 +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 25 "/usr/include/malloc.h" 2 3 4 +# 46 "/usr/include/malloc.h" 3 4 + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) ; + + +extern void *calloc (size_t __nmemb, size_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)) ; + + + +extern void *realloc (void *__ptr, size_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + +extern void *memalign (size_t __alignment, size_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)) ; + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)) ; + + + +extern void * pvalloc (size_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)) ; + + + +extern void *(*__morecore) (ptrdiff_t __size); + + +extern void *__default_morecore (ptrdiff_t __size) __attribute__ ((__nothrow__)) + __attribute__ ((__malloc__)); + + + +struct mallinfo { + int arena; + int ordblks; + int smblks; + int hblks; + int hblkhd; + int usmblks; + int fsmblks; + int uordblks; + int fordblks; + int keepcost; +}; + + +extern struct mallinfo mallinfo (void) __attribute__ ((__nothrow__)); +# 128 "/usr/include/malloc.h" 3 4 +extern int mallopt (int __param, int __val) __attribute__ ((__nothrow__)); + + + +extern int malloc_trim (size_t __pad) __attribute__ ((__nothrow__)); + + + +extern size_t malloc_usable_size (void *__ptr) __attribute__ ((__nothrow__)); + + +extern void malloc_stats (void) __attribute__ ((__nothrow__)); + + +extern void *malloc_get_state (void) __attribute__ ((__nothrow__)); + + + +extern int malloc_set_state (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void (*__malloc_initialize_hook) (void); + +extern void (*__free_hook) (void *__ptr, __const void *); + +extern void *(*__malloc_hook) (size_t __size, __const void *); + +extern void *(*__realloc_hook) (void *__ptr, size_t __size, __const void *); + +extern void *(*__memalign_hook) (size_t __alignment, size_t __size, __const void *); + + +extern void (*__after_morecore_hook) (void); + + +extern void __malloc_check_init (void) __attribute__ ((__nothrow__)); + + + +# 398 "../../GCC/gcc/system.h" 2 +# 521 "../../GCC/gcc/system.h" +# 1 "../../GCC/gcc/../include/filenames.h" 1 +# 522 "../../GCC/gcc/system.h" 2 +# 532 "../../GCC/gcc/system.h" +# 1 "../../GCC/gcc/../include/libiberty.h" 1 +# 42 "../../GCC/gcc/../include/libiberty.h" +# 1 "../../GCC/gcc/../include/ansidecl.h" 1 +# 43 "../../GCC/gcc/../include/libiberty.h" 2 + + +# 1 "/usr/lib/gcc/i386-redhat-linux/4.1.1/include/stddef.h" 1 3 4 +# 46 "../../GCC/gcc/../include/libiberty.h" 2 +# 55 "../../GCC/gcc/../include/libiberty.h" +extern void unlock_stream (FILE *); + + + + + +extern void unlock_std_streams (void); + + + + + +extern FILE *fopen_unlocked (const char *, const char *); +extern FILE *fdopen_unlocked (int, const char *); +extern FILE *freopen_unlocked (const char *, const char *, FILE *); + + + + +extern char **buildargv (const char *) __attribute__ ((__malloc__)); + + + +extern void freeargv (char **); + + + + +extern char **dupargv (char **) __attribute__ ((__malloc__)); + + + +extern void expandargv (int *, char ***); +# 112 "../../GCC/gcc/../include/libiberty.h" +extern const char *lbasename (const char *); + + + +extern char *lrealpath (const char *); + + + + + +extern char *concat (const char *, ...) __attribute__ ((__malloc__)) __attribute__ ((__sentinel__)); +# 131 "../../GCC/gcc/../include/libiberty.h" +extern char *reconcat (char *, const char *, ...) __attribute__ ((__malloc__)) __attribute__ ((__sentinel__)); + + + + + +extern unsigned long concat_length (const char *, ...) __attribute__ ((__sentinel__)); + + + + + + +extern char *concat_copy (char *, const char *, ...) __attribute__ ((__sentinel__)); + + + + + + +extern char *concat_copy2 (const char *, ...) __attribute__ ((__sentinel__)); + + + +extern char *libiberty_concat_ptr; +# 167 "../../GCC/gcc/../include/libiberty.h" +extern int fdmatch (int fd1, int fd2); +# 179 "../../GCC/gcc/../include/libiberty.h" +extern char * getpwd (void); +# 192 "../../GCC/gcc/../include/libiberty.h" +extern long get_run_time (void); + + + + +extern char *make_relative_prefix (const char *, const char *, + const char *) __attribute__ ((__malloc__)); + + + +extern char *choose_temp_base (void) __attribute__ ((__malloc__)); + + + +extern char *make_temp_file (const char *) __attribute__ ((__malloc__)); + + + +extern int unlink_if_ordinary (const char *); + + + +extern const char *spaces (int count); + + + + +extern int errno_max (void); + + + + +extern const char *strerrno (int); + + + +extern int strtoerrno (const char *); + + + +extern char *xstrerror (int); + + + + +extern int signo_max (void); +# 249 "../../GCC/gcc/../include/libiberty.h" +extern const char *strsigno (int); + + + +extern int strtosigno (const char *); + + + +extern int xatexit (void (*fn) (void)); + + + +extern void xexit (int status) __attribute__ ((__noreturn__)); + + + +extern void xmalloc_set_program_name (const char *); + + +extern void xmalloc_failed (size_t) __attribute__ ((__noreturn__)); + + + + + +extern void *xmalloc (size_t) __attribute__ ((__malloc__)); + + + + + +extern void *xrealloc (void *, size_t); + + + + +extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); + + + +extern char *xstrdup (const char *) __attribute__ ((__malloc__)); + + + +extern char *xstrndup (const char *, size_t) __attribute__ ((__malloc__)); + + + +extern void *xmemdup (const void *, size_t, size_t) __attribute__ ((__malloc__)); + + +extern double physmem_total (void); +extern double physmem_available (void); +# 338 "../../GCC/gcc/../include/libiberty.h" +extern const unsigned char _hex_value[256]; +extern void hex_init (void); +# 364 "../../GCC/gcc/../include/libiberty.h" +extern struct pex_obj *pex_init (int flags, const char *pname, + const char *tempbase); +# 446 "../../GCC/gcc/../include/libiberty.h" +extern const char *pex_run (struct pex_obj *obj, int flags, + const char *executable, char * const *argv, + const char *outname, const char *errname, + int *err); +# 461 "../../GCC/gcc/../include/libiberty.h" +extern const char *pex_run_in_environment (struct pex_obj *obj, int flags, + const char *executable, + char * const *argv, + char * const *env, + const char *outname, + const char *errname, int *err); + + + + + +extern FILE *pex_input_file (struct pex_obj *obj, int flags, + const char *in_name); + + + + + + +extern FILE *pex_input_pipe (struct pex_obj *obj, int binary); + + + + + + + +extern FILE *pex_read_output (struct pex_obj *, int binary); + + + + + +extern int pex_get_status (struct pex_obj *, int count, int *vector); + + + + + + +struct pex_time +{ + unsigned long user_seconds; + unsigned long user_microseconds; + unsigned long system_seconds; + unsigned long system_microseconds; +}; + +extern int pex_get_times (struct pex_obj *, int count, + struct pex_time *vector); + + + +extern void pex_free (struct pex_obj *); +# 527 "../../GCC/gcc/../include/libiberty.h" +extern const char *pex_one (int flags, const char *executable, + char * const *argv, const char *pname, + const char *outname, const char *errname, + int *status, int *err); +# 546 "../../GCC/gcc/../include/libiberty.h" +extern int pexecute (const char *, char * const *, const char *, + const char *, char **, char **, int); + + + +extern int pwait (int, int *, int); +# 590 "../../GCC/gcc/../include/libiberty.h" +extern void *C_alloca (size_t) __attribute__ ((__malloc__)); +# 533 "../../GCC/gcc/system.h" 2 +# 570 "../../GCC/gcc/system.h" +extern void fancy_abort (const char *, int, const char *) __attribute__ ((__noreturn__)); +# 614 "../../GCC/gcc/system.h" +# 1 "../../GCC/gcc/double-int.h" 1 +# 49 "../../GCC/gcc/double-int.h" +typedef struct +{ + unsigned long low; + long high; +} double_int; + +union tree_node; + + + +union tree_node *double_int_to_tree (union tree_node *, double_int); +double_int tree_to_double_int (union tree_node *tree); + + + + +static __inline__ double_int +shwi_to_double_int (long cst) +{ + double_int r; + + r.low = (unsigned long) cst; + r.high = cst < 0 ? -1 : 0; + + return r; +} +# 87 "../../GCC/gcc/double-int.h" +static __inline__ double_int +uhwi_to_double_int (unsigned long cst) +{ + double_int r; + + r.low = cst; + r.high = 0; + + return r; +} + + + + + + +double_int double_int_mul (double_int, double_int); +double_int double_int_add (double_int, double_int); +double_int double_int_neg (double_int); + + + + +unsigned char double_int_fits_in_hwi_p (double_int, unsigned char); +unsigned char double_int_fits_in_shwi_p (double_int); +unsigned char double_int_fits_in_uhwi_p (double_int); +long double_int_to_shwi (double_int); +unsigned long double_int_to_uhwi (double_int); +double_int double_int_div (double_int, double_int, unsigned char, unsigned); +double_int double_int_sdiv (double_int, double_int, unsigned); +double_int double_int_udiv (double_int, double_int, unsigned); +double_int double_int_mod (double_int, double_int, unsigned char, unsigned); +double_int double_int_smod (double_int, double_int, unsigned); +double_int double_int_umod (double_int, double_int, unsigned); +double_int double_int_divmod (double_int, double_int, unsigned char, unsigned, double_int *); +double_int double_int_sdivmod (double_int, double_int, unsigned, double_int *); +double_int double_int_udivmod (double_int, double_int, unsigned, double_int *); +unsigned char double_int_negative_p (double_int); +int double_int_cmp (double_int, double_int, unsigned char); +int double_int_scmp (double_int, double_int); +int double_int_ucmp (double_int, double_int); +void dump_double_int (FILE *, double_int, unsigned char); + + + +double_int double_int_ext (double_int, unsigned, unsigned char); +double_int double_int_sext (double_int, unsigned); +double_int double_int_zext (double_int, unsigned); +# 144 "../../GCC/gcc/double-int.h" +static __inline__ unsigned char +double_int_zero_p (double_int cst) +{ + return cst.low == 0 && cst.high == 0; +} + + + +static __inline__ unsigned char +double_int_one_p (double_int cst) +{ + return cst.low == 1 && cst.high == 0; +} + + + +static __inline__ unsigned char +double_int_minus_one_p (double_int cst) +{ + return (cst.low == (~((unsigned long) 0)) && cst.high == -1); +} + + + +static __inline__ unsigned char +double_int_equal_p (double_int cst1, double_int cst2) +{ + return cst1.low == cst2.low && cst1.high == cst2.high; +} +# 615 "../../GCC/gcc/system.h" 2 +# 650 "../../GCC/gcc/system.h" + + + + + + + + + + +# 691 "../../GCC/gcc/system.h" + +# 741 "../../GCC/gcc/system.h" + +# 757 "../../GCC/gcc/system.h" + +# 767 "../../GCC/gcc/system.h" + +# 41 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/coretypes.h" 1 +# 39 "../../GCC/gcc/coretypes.h" +struct bitmap_head_def; +typedef struct bitmap_head_def *bitmap; +struct rtx_def; +typedef struct rtx_def *rtx; +struct rtvec_def; +typedef struct rtvec_def *rtvec; +union tree_node; +typedef union tree_node *tree; +union section; +typedef union section section; + + + + + +struct cpp_reader; + + + + +enum tls_model { + TLS_MODEL_NONE, + TLS_MODEL_GLOBAL_DYNAMIC, + TLS_MODEL_LOCAL_DYNAMIC, + TLS_MODEL_INITIAL_EXEC, + TLS_MODEL_LOCAL_EXEC +}; +# 42 "../../GCC/gcc/c-parser.c" 2 +# 1 "./tm.h" 1 + + + + + + +# 1 "./options.h" 1 + + + + + +extern int target_flags; + +extern int warn_abi; +extern int warn_address; +extern int warn_aggregate_return; +extern int warn_assign_intercept; +extern int warn_attributes; +extern int warn_bad_function_cast; +extern int warn_cxx_compat; +extern int warn_cast_align; +extern int warn_cast_qual; +extern int warn_char_subscripts; +extern int warn_conversion; +extern int warn_ctor_dtor_privacy; +extern int warn_declaration_after_statement; +extern int warn_deprecated; +extern int warn_deprecated_decl; +extern int warn_disabled_optimization; +extern int warn_div_by_zero; +extern int warn_ecpp; +extern int warnings_are_errors; +extern int flag_fatal_errors; +extern int warn_float_equal; +extern int warn_format_extra_args; +extern int warn_format_nonliteral; +extern int warn_format_security; +extern int warn_format_y2k; +extern int warn_format_zero_length; +extern int mesg_implicit_function_declaration; +extern int warn_implicit_int; +extern int warn_init_self; +extern int warn_inline; +extern int warn_int_to_pointer_cast; +extern int warn_invalid_offsetof; +extern int warn_long_long; +extern int warn_missing_braces; +extern int warn_missing_declarations; +extern int warn_missing_field_initializers; +extern int warn_missing_format_attribute; +extern int warn_missing_noreturn; +extern int warn_missing_prototypes; +extern int warn_nested_externs; +extern int warn_nontemplate_friend; +extern int warn_nonvdtor; +extern int warn_nonnull; +extern int warn_old_style_cast; +extern int warn_old_style_definition; +extern int warn_overflow; +extern int warn_overlength_strings; +extern int warn_overloaded_virtual; +extern int warn_override_init; +extern int warn_packed; +extern int warn_padded; +extern int warn_parentheses; +extern int warn_pmf2ptr; +extern int warn_pointer_arith; +extern int warn_pointer_sign; +extern int warn_pointer_to_int_cast; +extern int warn_pragmas; +extern int warn_protocol; +extern int warn_redundant_decls; +extern int warn_reorder; +extern int warn_return_type; +extern int warn_selector; +extern int warn_sequence_point; +extern int warn_shadow; +extern int warn_sign_compare; +extern int warn_sign_promo; +extern int warn_stack_protect; +extern int warn_strict_prototypes; +extern int warn_strict_selector_match; +extern int warn_switch; +extern int warn_switch_default; +extern int warn_switch_enum; +extern int warn_synth; +extern int warn_system_headers; +extern int warn_traditional; +extern int warn_undeclared_selector; +extern int warn_uninitialized; +extern int warn_notreached; +extern int warn_unsafe_loop_optimizations; +extern int warn_unused_function; +extern int warn_unused_label; +extern int warn_unused_parameter; +extern int warn_unused_value; +extern int warn_unused_variable; +extern int warn_register_var; +extern int warn_write_strings; +extern int flag_pic; +extern int flag_pie; +extern int flag_abi_version; +extern int align_functions; +extern int align_jumps; +extern int align_labels; +extern int align_loops; +extern int flag_argument_noalias; +extern int flag_argument_noalias; +extern int flag_argument_noalias; +extern int flag_argument_noalias; +extern int flag_asynchronous_unwind_tables; +extern int flag_bounds_check; +extern int flag_branch_on_count_reg; +extern int flag_branch_probabilities; +extern int flag_branch_target_load_optimize; +extern int flag_branch_target_load_optimize2; +extern int flag_btr_bb_exclusive; +extern int flag_caller_saves; +extern int flag_no_common; +extern int flag_cprop_registers; +extern int flag_crossjumping; +extern int flag_cse_follow_jumps; +extern int flag_cse_skip_blocks; +extern int flag_cx_limited_range; +extern int flag_data_sections; +extern int flag_defer_pop; +extern int flag_delayed_branch; +extern int flag_delete_null_pointer_checks; +extern int flag_dump_noaddr; +extern int flag_dump_unnumbered; +extern int flag_early_inlining; +extern int flag_eliminate_dwarf2_dups; +extern int flag_debug_only_used_symbols; +extern int flag_eliminate_unused_debug_types; +extern int flag_emit_class_debug_always; +extern int flag_exceptions; +extern int flag_expensive_optimizations; +extern int flag_finite_math_only; +extern int flag_float_store; +extern int flag_force_addr; +extern int flag_force_mem; +extern int flag_friend_injection; +extern int flag_no_function_cse; +extern int flag_function_sections; +extern int flag_gcse; +extern int flag_gcse_after_reload; +extern int flag_gcse_las; +extern int flag_gcse_lm; +extern int flag_gcse_sm; +extern int flag_gnu89_inline; +extern int flag_guess_branch_prob; +extern int flag_no_ident; +extern int flag_if_conversion; +extern int flag_if_conversion2; +extern int flag_inhibit_size_directive; +extern int flag_no_inline; +extern int flag_inline_functions; +extern int flag_inline_functions_called_once; +extern int flag_instrument_function_entry_exit; +extern int flag_ipa_cp; +extern int flag_ipa_pta; +extern int flag_ipa_pure_const; +extern int flag_ipa_reference; +extern int flag_ipa_type_escape; +extern int flag_ivopts; +extern int flag_jump_tables; +extern int flag_keep_inline_functions; +extern int flag_keep_static_consts; +extern int flag_leading_underscore; +extern int flag_errno_math; +extern int mem_report; +extern int flag_merge_constants; +extern int flag_merge_constants; +extern int flag_modulo_sched; +extern int flag_move_loop_invariants; +extern int flag_mudflap; +extern int flag_mudflap_ignore_reads; +extern int flag_mudflap; +extern int flag_non_call_exceptions; +extern int flag_objc_call_cxx_cdtors; +extern int flag_objc_direct_dispatch; +extern int flag_objc_exceptions; +extern int flag_objc_gc; +extern int flag_objc_sjlj_exceptions; +extern int flag_omit_frame_pointer; +extern int flag_openmp; +extern int flag_regmove; +extern int flag_optimize_sibling_calls; +extern int flag_pack_struct; +extern int flag_pcc_struct_return; +extern int flag_peel_loops; +extern int flag_no_peephole; +extern int flag_peephole2; +extern int flag_pic; +extern int flag_pie; +extern int flag_prefetch_loop_arrays; +extern int profile_flag; +extern int profile_arc_flag; +extern int flag_profile_values; +extern int flag_pcc_struct_return; +extern int flag_regmove; +extern int flag_rename_registers; +extern int flag_reorder_blocks; +extern int flag_reorder_blocks_and_partition; +extern int flag_reorder_functions; +extern int flag_rerun_cse_after_loop; +extern int flag_resched_modulo_sched; +extern int flag_rounding_math; +extern int flag_rtl_seqabstr; +extern int flag_schedule_interblock; +extern int flag_schedule_speculative; +extern int flag_schedule_speculative_load; +extern int flag_schedule_speculative_load_dangerous; +extern int flag_sched_stalled_insns; +extern int flag_sched_stalled_insns_dep; +extern int flag_sched2_use_superblocks; +extern int flag_sched2_use_traces; +extern int flag_schedule_insns; +extern int flag_schedule_insns_after_reload; +extern int flag_section_anchors; +extern int flag_see; +extern int flag_show_column; +extern int flag_signaling_nans; +extern int flag_single_precision_constant; +extern int flag_split_ivs_in_unroller; +extern int flag_stack_check; +extern int flag_stack_protect; +extern int flag_stack_protect; +extern int flag_strict_aliasing; +extern int flag_strict_overflow; +extern int flag_syntax_only; +extern int flag_test_coverage; +extern int flag_thread_jumps; +extern int time_report; +extern int flag_toplevel_reorder; +extern int flag_tracer; +extern int flag_trapping_math; +extern int flag_trapv; +extern int flag_tree_ccp; +extern int flag_tree_ch; +extern int flag_tree_combine_temps; +extern int flag_tree_copy_prop; +extern int flag_tree_copyrename; +extern int flag_tree_dce; +extern int flag_tree_dom; +extern int flag_tree_dse; +extern int flag_tree_fre; +extern int flag_tree_loop_im; +extern int flag_tree_loop_ivcanon; +extern int flag_tree_loop_linear; +extern int flag_tree_loop_optimize; +extern int flag_tree_live_range_split; +extern int flag_tree_pre; +extern int flag_tree_salias; +extern int flag_tree_sink; +extern int flag_tree_sra; +extern int flag_tree_store_ccp; +extern int flag_tree_store_copy_prop; +extern int flag_tree_ter; +extern int flag_tree_vect_loop_version; +extern int flag_tree_vectorize; +extern int flag_tree_vrp; +extern int flag_unit_at_a_time; +extern int flag_unroll_all_loops; +extern int flag_unroll_loops; +extern int flag_unsafe_loop_optimizations; +extern int flag_unsafe_math_optimizations; +extern int flag_unswitch_loops; +extern int flag_unwind_tables; +extern int flag_var_tracking; +extern int flag_variable_expansion_in_unroller; +extern int flag_verbose_asm; +extern int flag_value_profile_transformations; +extern int flag_web; +extern int flag_whole_program; +extern int flag_wrapv; +extern int flag_zero_initialized_in_bss; +extern const char *ix86_align_funcs_string; +extern const char *ix86_align_jumps_string; +extern const char *ix86_align_loops_string; +extern const char *ix86_arch_string; +extern const char *ix86_asm_string; +extern const char *ix86_branch_cost_string; +extern const char *ix86_cmodel_string; +extern int TARGET_DEBUG_ADDR; +extern int TARGET_DEBUG_ARG; +extern const char *ix86_fpmath_string; +extern int linux_uclibc; +extern const char *ix86_section_threshold_string; +extern const char *ix86_preferred_stack_boundary_string; +extern const char *ix86_regparm_string; +extern int ix86_force_align_arg_pointer; +extern const char *ix86_tls_dialect_string; +extern const char *ix86_tune_string; +extern int linux_uclibc; +extern int profile_flag; +extern int pedantic; +extern int quiet_flag; +extern int version_flag; +extern int inhibit_warnings; +# 362 "./options.h" +enum opt_code +{ + OPT__help, + OPT__output_pch_, + OPT__param, + OPT__target_help, + OPT__version, + OPT_A, + OPT_C, + OPT_CC, + OPT_D, + OPT_E, + OPT_F, + OPT_G, + OPT_H, + OPT_I, + OPT_M, + OPT_MD, + OPT_MF, + OPT_MG, + OPT_MM, + OPT_MMD, + OPT_MP, + OPT_MQ, + OPT_MT, + OPT_O, + OPT_Os, + OPT_P, + OPT_U, + OPT_W, + OPT_Wabi, + OPT_Waddress, + OPT_Waggregate_return, + OPT_Wall, + OPT_Wassign_intercept, + OPT_Wattributes, + OPT_Wbad_function_cast, + OPT_Wc___compat, + OPT_Wcast_align, + OPT_Wcast_qual, + OPT_Wchar_subscripts, + OPT_Wcomment, + OPT_Wcomments, + OPT_Wconversion, + OPT_Wctor_dtor_privacy, + OPT_Wdeclaration_after_statement, + OPT_Wdeprecated, + OPT_Wdeprecated_declarations, + OPT_Wdisabled_optimization, + OPT_Wdiv_by_zero, + OPT_Weffc__, + OPT_Wendif_labels, + OPT_Werror, + OPT_Werror_implicit_function_declaration, + OPT_Werror_, + OPT_Wextra, + OPT_Wfatal_errors, + OPT_Wfloat_equal, + OPT_Wformat, + OPT_Wformat_extra_args, + OPT_Wformat_nonliteral, + OPT_Wformat_security, + OPT_Wformat_y2k, + OPT_Wformat_zero_length, + OPT_Wformat_, + OPT_Wimplicit, + OPT_Wimplicit_function_declaration, + OPT_Wimplicit_int, + OPT_Wimport, + OPT_Winit_self, + OPT_Winline, + OPT_Wint_to_pointer_cast, + OPT_Winvalid_offsetof, + OPT_Winvalid_pch, + OPT_Wlarger_than_, + OPT_Wlong_long, + OPT_Wmain, + OPT_Wmissing_braces, + OPT_Wmissing_declarations, + OPT_Wmissing_field_initializers, + OPT_Wmissing_format_attribute, + OPT_Wmissing_include_dirs, + OPT_Wmissing_noreturn, + OPT_Wmissing_prototypes, + OPT_Wmultichar, + OPT_Wnested_externs, + OPT_Wnon_template_friend, + OPT_Wnon_virtual_dtor, + OPT_Wnonnull, + OPT_Wnormalized_, + OPT_Wold_style_cast, + OPT_Wold_style_definition, + OPT_Woverflow, + OPT_Woverlength_strings, + OPT_Woverloaded_virtual, + OPT_Woverride_init, + OPT_Wpacked, + OPT_Wpadded, + OPT_Wparentheses, + OPT_Wpmf_conversions, + OPT_Wpointer_arith, + OPT_Wpointer_sign, + OPT_Wpointer_to_int_cast, + OPT_Wpragmas, + OPT_Wprotocol, + OPT_Wredundant_decls, + OPT_Wreorder, + OPT_Wreturn_type, + OPT_Wselector, + OPT_Wsequence_point, + OPT_Wshadow, + OPT_Wsign_compare, + OPT_Wsign_promo, + OPT_Wstack_protector, + OPT_Wstrict_aliasing, + OPT_Wstrict_aliasing_, + OPT_Wstrict_null_sentinel, + OPT_Wstrict_overflow, + OPT_Wstrict_overflow_, + OPT_Wstrict_prototypes, + OPT_Wstrict_selector_match, + OPT_Wswitch, + OPT_Wswitch_default, + OPT_Wswitch_enum, + OPT_Wsynth, + OPT_Wsystem_headers, + OPT_Wtraditional, + OPT_Wtrigraphs, + OPT_Wundeclared_selector, + OPT_Wundef, + OPT_Wuninitialized, + OPT_Wunknown_pragmas, + OPT_Wunreachable_code, + OPT_Wunsafe_loop_optimizations, + OPT_Wunused, + OPT_Wunused_function, + OPT_Wunused_label, + OPT_Wunused_macros, + OPT_Wunused_parameter, + OPT_Wunused_value, + OPT_Wunused_variable, + OPT_Wvariadic_macros, + OPT_Wvolatile_register_var, + OPT_Wwrite_strings, + OPT_ansi, + OPT_aux_info, + OPT_aux_info_, + OPT_auxbase, + OPT_auxbase_strip, + OPT_d, + OPT_dumpbase, + OPT_fPIC, + OPT_fPIE, + OPT_fabi_version_, + OPT_faccess_control, + OPT_falign_functions, + OPT_falign_functions_, + OPT_falign_jumps, + OPT_falign_jumps_, + OPT_falign_labels, + OPT_falign_labels_, + OPT_falign_loops, + OPT_falign_loops_, + OPT_fall_virtual, + OPT_falt_external_templates, + OPT_fargument_alias, + OPT_fargument_noalias, + OPT_fargument_noalias_anything, + OPT_fargument_noalias_global, + OPT_fasm, + OPT_fasynchronous_unwind_tables, + OPT_fbounds_check, + OPT_fbranch_count_reg, + OPT_fbranch_probabilities, + OPT_fbranch_target_load_optimize, + OPT_fbranch_target_load_optimize2, + OPT_fbtr_bb_exclusive, + OPT_fbuiltin, + OPT_fbuiltin_, + OPT_fcall_saved_, + OPT_fcall_used_, + OPT_fcaller_saves, + OPT_fcheck_new, + OPT_fcommon, + OPT_fcond_mismatch, + OPT_fconserve_space, + OPT_fconstant_string_class_, + OPT_fcprop_registers, + OPT_fcrossjumping, + OPT_fcse_follow_jumps, + OPT_fcse_skip_blocks, + OPT_fcx_limited_range, + OPT_fdata_sections, + OPT_fdefault_inline, + OPT_fdefer_pop, + OPT_fdelayed_branch, + OPT_fdelete_null_pointer_checks, + OPT_fdiagnostics_show_location_, + OPT_fdiagnostics_show_option, + OPT_fdollars_in_identifiers, + OPT_fdump_, + OPT_fdump_noaddr, + OPT_fdump_unnumbered, + OPT_fearly_inlining, + OPT_felide_constructors, + OPT_feliminate_dwarf2_dups, + OPT_feliminate_unused_debug_symbols, + OPT_feliminate_unused_debug_types, + OPT_femit_class_debug_always, + OPT_fenforce_eh_specs, + OPT_fenum_int_equiv, + OPT_fexceptions, + OPT_fexec_charset_, + OPT_fexpensive_optimizations, + OPT_fextended_identifiers, + OPT_fexternal_templates, + OPT_ffast_math, + OPT_ffinite_math_only, + OPT_ffixed_, + OPT_ffloat_store, + OPT_ffor_scope, + OPT_fforce_addr, + OPT_fforce_mem, + OPT_ffreestanding, + OPT_ffriend_injection, + OPT_ffunction_cse, + OPT_ffunction_sections, + OPT_fgcse, + OPT_fgcse_after_reload, + OPT_fgcse_las, + OPT_fgcse_lm, + OPT_fgcse_sm, + OPT_fgnu_keywords, + OPT_fgnu_runtime, + OPT_fgnu89_inline, + OPT_fguess_branch_probability, + OPT_fguiding_decls, + OPT_fhandle_exceptions, + OPT_fhonor_std, + OPT_fhosted, + OPT_fhuge_objects, + OPT_fident, + OPT_fif_conversion, + OPT_fif_conversion2, + OPT_fimplement_inlines, + OPT_fimplicit_inline_templates, + OPT_fimplicit_templates, + OPT_finhibit_size_directive, + OPT_finline, + OPT_finline_functions, + OPT_finline_functions_called_once, + OPT_finline_limit_, + OPT_finline_limit_eq, + OPT_finput_charset_, + OPT_finstrument_functions, + OPT_fipa_cp, + OPT_fipa_pta, + OPT_fipa_pure_const, + OPT_fipa_reference, + OPT_fipa_type_escape, + OPT_fivopts, + OPT_fjump_tables, + OPT_fkeep_inline_functions, + OPT_fkeep_static_consts, + OPT_flabels_ok, + OPT_fleading_underscore, + OPT_flexer_trace, + OPT_floop_optimize, + OPT_fmath_errno, + OPT_fmem_report, + OPT_fmerge_all_constants, + OPT_fmerge_constants, + OPT_fmessage_length_, + OPT_fmodulo_sched, + OPT_fmove_loop_invariants, + OPT_fms_extensions, + OPT_fmudflap, + OPT_fmudflapir, + OPT_fmudflapth, + OPT_fname_mangling_version_, + OPT_fnew_abi, + OPT_fnext_runtime, + OPT_fnil_receivers, + OPT_fnon_call_exceptions, + OPT_fnonansi_builtins, + OPT_fnonnull_objects, + OPT_fobjc_call_cxx_cdtors, + OPT_fobjc_direct_dispatch, + OPT_fobjc_exceptions, + OPT_fobjc_gc, + OPT_fobjc_sjlj_exceptions, + OPT_fomit_frame_pointer, + OPT_fopenmp, + OPT_foperator_names, + OPT_foptimize_register_move, + OPT_foptimize_sibling_calls, + OPT_foptional_diags, + OPT_fpack_struct, + OPT_fpack_struct_, + OPT_fparser_trace, + OPT_fpcc_struct_return, + OPT_fpch_deps, + OPT_fpch_preprocess, + OPT_fpeel_loops, + OPT_fpeephole, + OPT_fpeephole2, + OPT_fpermissive, + OPT_fpic, + OPT_fpie, + OPT_fprefetch_loop_arrays, + OPT_fpreprocessed, + OPT_fprofile, + OPT_fprofile_arcs, + OPT_fprofile_generate, + OPT_fprofile_use, + OPT_fprofile_values, + OPT_frandom_seed, + OPT_frandom_seed_, + OPT_freg_struct_return, + OPT_fregmove, + OPT_frename_registers, + OPT_freorder_blocks, + OPT_freorder_blocks_and_partition, + OPT_freorder_functions, + OPT_freplace_objc_classes, + OPT_frepo, + OPT_frerun_cse_after_loop, + OPT_frerun_loop_opt, + OPT_freschedule_modulo_scheduled_loops, + OPT_frounding_math, + OPT_frtl_abstract_sequences, + OPT_frtti, + OPT_fsched_interblock, + OPT_fsched_spec, + OPT_fsched_spec_load, + OPT_fsched_spec_load_dangerous, + OPT_fsched_stalled_insns, + OPT_fsched_stalled_insns_dep, + OPT_fsched_stalled_insns_dep_, + OPT_fsched_stalled_insns_, + OPT_fsched_verbose_, + OPT_fsched2_use_superblocks, + OPT_fsched2_use_traces, + OPT_fschedule_insns, + OPT_fschedule_insns2, + OPT_fsection_anchors, + OPT_fsee, + OPT_fshort_double, + OPT_fshort_enums, + OPT_fshort_wchar, + OPT_fshow_column, + OPT_fsignaling_nans, + OPT_fsigned_bitfields, + OPT_fsigned_char, + OPT_fsingle_precision_constant, + OPT_fsplit_ivs_in_unroller, + OPT_fsquangle, + OPT_fstack_check, + OPT_fstack_limit, + OPT_fstack_limit_register_, + OPT_fstack_limit_symbol_, + OPT_fstack_protector, + OPT_fstack_protector_all, + OPT_fstats, + OPT_fstrength_reduce, + OPT_fstrict_aliasing, + OPT_fstrict_overflow, + OPT_fstrict_prototype, + OPT_fsyntax_only, + OPT_ftabstop_, + OPT_ftemplate_depth_, + OPT_ftest_coverage, + OPT_fthis_is_variable, + OPT_fthread_jumps, + OPT_fthreadsafe_statics, + OPT_ftime_report, + OPT_ftls_model_, + OPT_ftoplevel_reorder, + OPT_ftracer, + OPT_ftrapping_math, + OPT_ftrapv, + OPT_ftree_ccp, + OPT_ftree_ch, + OPT_ftree_combine_temps, + OPT_ftree_copy_prop, + OPT_ftree_copyrename, + OPT_ftree_dce, + OPT_ftree_dominator_opts, + OPT_ftree_dse, + OPT_ftree_fre, + OPT_ftree_loop_im, + OPT_ftree_loop_ivcanon, + OPT_ftree_loop_linear, + OPT_ftree_loop_optimize, + OPT_ftree_lrs, + OPT_ftree_pre, + OPT_ftree_salias, + OPT_ftree_sink, + OPT_ftree_sra, + OPT_ftree_store_ccp, + OPT_ftree_store_copy_prop, + OPT_ftree_ter, + OPT_ftree_vect_loop_version, + OPT_ftree_vectorize, + OPT_ftree_vectorizer_verbose_, + OPT_ftree_vrp, + OPT_funit_at_a_time, + OPT_funroll_all_loops, + OPT_funroll_loops, + OPT_funsafe_loop_optimizations, + OPT_funsafe_math_optimizations, + OPT_funsigned_bitfields, + OPT_funsigned_char, + OPT_funswitch_loops, + OPT_funwind_tables, + OPT_fuse_cxa_atexit, + OPT_fuse_cxa_get_exception_ptr, + OPT_fvar_tracking, + OPT_fvariable_expansion_in_unroller, + OPT_fverbose_asm, + OPT_fvisibility_inlines_hidden, + OPT_fvisibility_, + OPT_fvpt, + OPT_fvtable_gc, + OPT_fvtable_thunks, + OPT_fweak, + OPT_fweb, + OPT_fwhole_program, + OPT_fwide_exec_charset_, + OPT_fworking_directory, + OPT_fwrapv, + OPT_fxref, + OPT_fzero_initialized_in_bss, + OPT_fzero_link, + OPT_g, + OPT_gcoff, + OPT_gdwarf_2, + OPT_gen_decls, + OPT_ggdb, + OPT_gstabs, + OPT_gstabs_, + OPT_gvms, + OPT_gxcoff, + OPT_gxcoff_, + OPT_idirafter, + OPT_imacros, + OPT_imultilib, + OPT_include, + OPT_iprefix, + OPT_iquote, + OPT_isysroot, + OPT_isystem, + OPT_iwithprefix, + OPT_iwithprefixbefore, + OPT_lang_asm, + OPT_lang_fortran, + OPT_lang_objc, + OPT_m128bit_long_double, + OPT_m32, + OPT_m386, + OPT_m3dnow, + OPT_m486, + OPT_m64, + OPT_m80387, + OPT_m96bit_long_double, + OPT_maccumulate_outgoing_args, + OPT_malign_double, + OPT_malign_functions_, + OPT_malign_jumps_, + OPT_malign_loops_, + OPT_malign_stringops, + OPT_march_, + OPT_masm_, + OPT_mbranch_cost_, + OPT_mcmodel_, + OPT_mdebug_addr, + OPT_mdebug_arg, + OPT_mfancy_math_387, + OPT_mfp_ret_in_387, + OPT_mfpmath_, + OPT_mglibc, + OPT_mhard_float, + OPT_mieee_fp, + OPT_minline_all_stringops, + OPT_mintel_syntax, + OPT_mlarge_data_threshold_, + OPT_mmmx, + OPT_mms_bitfields, + OPT_mno_align_stringops, + OPT_mno_fancy_math_387, + OPT_mno_push_args, + OPT_mno_red_zone, + OPT_momit_leaf_frame_pointer, + OPT_mpentium, + OPT_mpentiumpro, + OPT_mpreferred_stack_boundary_, + OPT_mpush_args, + OPT_mred_zone, + OPT_mregparm_, + OPT_mrtd, + OPT_msoft_float, + OPT_msse, + OPT_msse2, + OPT_msse3, + OPT_msseregparm, + OPT_mstack_arg_probe, + OPT_mstackrealign, + OPT_msvr3_shlib, + OPT_mtls_dialect_, + OPT_mtls_direct_seg_refs, + OPT_mtune_, + OPT_muclibc, + OPT_nostdinc, + OPT_nostdinc__, + OPT_o, + OPT_p, + OPT_pedantic, + OPT_pedantic_errors, + OPT_print_objc_runtime_info, + OPT_print_pch_checksum, + OPT_quiet, + OPT_remap, + OPT_std_c__98, + OPT_std_c89, + OPT_std_c99, + OPT_std_c9x, + OPT_std_gnu__98, + OPT_std_gnu89, + OPT_std_gnu99, + OPT_std_gnu9x, + OPT_std_iso9899_1990, + OPT_std_iso9899_199409, + OPT_std_iso9899_1999, + OPT_std_iso9899_199x, + OPT_traditional_cpp, + OPT_trigraphs, + OPT_undef, + OPT_v, + OPT_version, + OPT_w, + OPT_y, + N_OPTS +}; +# 8 "./tm.h" 2 +# 1 "../../GCC/gcc/config/i386/i386.h" 1 +# 38 "../../GCC/gcc/config/i386/i386.h" +struct processor_costs { + const int add; + const int lea; + const int shift_var; + const int shift_const; + const int mult_init[5]; + + const int mult_bit; + const int divide[5]; + + int movsx; + int movzx; + const int large_insn; + const int move_ratio; + + const int movzbl_load; + const int int_load[3]; + + + const int int_store[3]; + + const int fp_move; + const int fp_load[3]; + + const int fp_store[3]; + + const int mmx_move; + const int mmx_load[2]; + + const int mmx_store[2]; + + const int sse_move; + const int sse_load[3]; + + const int sse_store[3]; + + const int mmxsse_to_integer; + + const int prefetch_block; + const int simultaneous_prefetches; + + const int branch_cost; + const int fadd; + const int fmul; + const int fdiv; + const int fabs; + const int fchs; + const int fsqrt; +}; + +extern const struct processor_costs *ix86_cost; +# 143 "../../GCC/gcc/config/i386/i386.h" +extern const int x86_use_leave, x86_push_memory, x86_zero_extend_with_and; +extern const int x86_use_bit_test, x86_cmove, x86_deep_branch; +extern const int x86_branch_hints, x86_unroll_strlen; +extern const int x86_double_with_add, x86_partial_reg_stall, x86_movx; +extern const int x86_use_himode_fiop, x86_use_simode_fiop; +extern const int x86_use_mov0, x86_use_cltd, x86_read_modify_write; +extern const int x86_read_modify, x86_split_long_moves; +extern const int x86_promote_QImode, x86_single_stringop, x86_fast_prefix; +extern const int x86_himode_math, x86_qimode_math, x86_promote_qi_regs; +extern const int x86_promote_hi_regs, x86_integer_DFmode_moves; +extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8; +extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall; +extern const int x86_accumulate_outgoing_args, x86_prologue_using_move; +extern const int x86_epilogue_using_move, x86_decompose_lea; +extern const int x86_arch_always_fancy_math_387, x86_shift1; +extern const int x86_sse_partial_reg_dependency, x86_sse_split_regs; +extern const int x86_sse_typeless_stores, x86_sse_load0_by_pxor; +extern const int x86_use_ffreep; +extern const int x86_inter_unit_moves, x86_schedule; +extern const int x86_use_bt; +extern const int x86_cmpxchg, x86_cmpxchg8b, x86_cmpxchg16b, x86_xadd; +extern const int x86_use_incdec; +extern const int x86_pad_returns; +extern const int x86_partial_flag_reg_stall; +extern int x86_prefetch_sse; +# 281 "../../GCC/gcc/config/i386/i386.h" +extern const char *host_detect_local_cpu (int argc, const char **argv); +# 1065 "../../GCC/gcc/config/i386/i386.h" +enum reg_class +{ + NO_REGS, + AREG, DREG, CREG, BREG, SIREG, DIREG, + AD_REGS, + Q_REGS, + NON_Q_REGS, + INDEX_REGS, + LEGACY_REGS, + GENERAL_REGS, + FP_TOP_REG, FP_SECOND_REG, + FLOAT_REGS, + SSE_REGS, + MMX_REGS, + FP_TOP_SSE_REGS, + FP_SECOND_SSE_REGS, + FLOAT_SSE_REGS, + FLOAT_INT_REGS, + INT_SSE_REGS, + FLOAT_INT_SSE_REGS, + ALL_REGS, LIM_REG_CLASSES +}; +# 1426 "../../GCC/gcc/config/i386/i386.h" +typedef struct ix86_args { + int words; + int nregs; + int regno; + int fastcall; + int sse_words; + int sse_nregs; + int warn_sse; + int warn_mmx; + int sse_regno; + int mmx_words; + int mmx_nregs; + int mmx_regno; + int maybe_vaarg; + int float_in_sse; + +} CUMULATIVE_ARGS; +# 1955 "../../GCC/gcc/config/i386/i386.h" +extern int const dbx_register_map[53]; +extern int const dbx64_register_map[53]; +extern int const svr4_dbx_register_map[53]; +# 2071 "../../GCC/gcc/config/i386/i386.h" +enum processor_type +{ + PROCESSOR_I386, + PROCESSOR_I486, + PROCESSOR_PENTIUM, + PROCESSOR_PENTIUMPRO, + PROCESSOR_K6, + PROCESSOR_ATHLON, + PROCESSOR_PENTIUM4, + PROCESSOR_K8, + PROCESSOR_NOCONA, + PROCESSOR_GENERIC32, + PROCESSOR_GENERIC64, + PROCESSOR_max +}; + +extern enum processor_type ix86_tune; +extern enum processor_type ix86_arch; + +enum fpmath_unit +{ + FPMATH_387 = 1, + FPMATH_SSE = 2 +}; + +extern enum fpmath_unit ix86_fpmath; + +enum tls_dialect +{ + TLS_DIALECT_GNU, + TLS_DIALECT_GNU2, + TLS_DIALECT_SUN +}; + +extern enum tls_dialect ix86_tls_dialect; + +enum cmodel { + CM_32, + CM_SMALL, + CM_KERNEL, + CM_MEDIUM, + CM_LARGE, + CM_SMALL_PIC, + CM_MEDIUM_PIC +}; + +extern enum cmodel ix86_cmodel; + + + + + + +enum asm_dialect { + ASM_ATT, + ASM_INTEL +}; + +extern enum asm_dialect ix86_asm_dialect; +extern unsigned int ix86_preferred_stack_boundary; +extern int ix86_branch_cost, ix86_section_threshold; + + +extern enum reg_class const regclass_map[53]; + +extern rtx ix86_compare_op0; +extern rtx ix86_compare_op1; +extern rtx ix86_compare_emitted; +# 2155 "../../GCC/gcc/config/i386/i386.h" +enum ix86_entity +{ + I387_TRUNC = 0, + I387_FLOOR, + I387_CEIL, + I387_MASK_PM, + MAX_386_ENTITIES +}; + +enum ix86_stack_slot +{ + SLOT_VIRTUAL = 0, + SLOT_TEMP, + SLOT_CW_STORED, + SLOT_CW_TRUNC, + SLOT_CW_FLOOR, + SLOT_CW_CEIL, + SLOT_CW_MASK_PM, + MAX_386_STACK_LOCALS +}; +# 2230 "../../GCC/gcc/config/i386/i386.h" +struct machine_function +{ + struct stack_local_entry *stack_locals; + const char *some_ld_name; + rtx force_align_arg_pointer; + int save_varrargs_registers; + int accesses_prev_frame; + int optimize_mode_switching[MAX_386_ENTITIES]; + + + int use_fast_prologue_epilogue; + + + int use_fast_prologue_epilogue_nregs; +# 2253 "../../GCC/gcc/config/i386/i386.h" + int tls_descriptor_call_expanded_p; +}; +# 9 "./tm.h" 2 +# 1 "../../GCC/gcc/config/i386/unix.h" 1 +# 10 "./tm.h" 2 +# 1 "../../GCC/gcc/config/i386/att.h" 1 +# 11 "./tm.h" 2 +# 1 "../../GCC/gcc/config/dbxelf.h" 1 +# 12 "./tm.h" 2 +# 1 "../../GCC/gcc/config/elfos.h" 1 +# 13 "./tm.h" 2 +# 1 "../../GCC/gcc/config/svr4.h" 1 +# 14 "./tm.h" 2 +# 1 "../../GCC/gcc/config/linux.h" 1 +# 15 "./tm.h" 2 +# 1 "../../GCC/gcc/config/i386/linux.h" 1 +# 16 "./tm.h" 2 +# 1 "../../GCC/gcc/defaults.h" 1 +# 741 "../../GCC/gcc/defaults.h" + +# 17 "./tm.h" 2 + + +# 1 "./insn-constants.h" 1 +# 20 "./tm.h" 2 +# 1 "./insn-flags.h" 1 +# 1102 "./insn-flags.h" +static __inline__ rtx gen_cmpdi_ccno_1_rex64 (rtx, rtx); +static __inline__ rtx +gen_cmpdi_ccno_1_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_cmpdi_1_insn_rex64 (rtx, rtx); +static __inline__ rtx +gen_cmpdi_1_insn_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_cmpqi_ext_3_insn (rtx, rtx); +static __inline__ rtx gen_cmpqi_ext_3_insn_rex64 (rtx, rtx); +static __inline__ rtx +gen_cmpqi_ext_3_insn_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_x86_fnstsw_1 (rtx); +extern rtx gen_x86_sahf_1 (rtx); +extern rtx gen_popsi1 (rtx); +extern rtx gen_movsi_insv_1 (rtx, rtx); +static __inline__ rtx gen_movdi_insv_1_rex64 (rtx, rtx); +static __inline__ rtx +gen_movdi_insv_1_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_popdi1 (rtx); +static __inline__ rtx +gen_popdi1(rtx a __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_swapxf (rtx, rtx); +extern rtx gen_zero_extendhisi2_and (rtx, rtx); +extern rtx gen_zero_extendsidi2_32 (rtx, rtx); +static __inline__ rtx gen_zero_extendsidi2_rex64 (rtx, rtx); +static __inline__ rtx +gen_zero_extendsidi2_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_zero_extendhidi2 (rtx, rtx); +static __inline__ rtx +gen_zero_extendhidi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_zero_extendqidi2 (rtx, rtx); +static __inline__ rtx +gen_zero_extendqidi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_extendsidi2_rex64 (rtx, rtx); +static __inline__ rtx +gen_extendsidi2_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_extendhidi2 (rtx, rtx); +static __inline__ rtx +gen_extendhidi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_extendqidi2 (rtx, rtx); +static __inline__ rtx +gen_extendqidi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_extendhisi2 (rtx, rtx); +extern rtx gen_extendqihi2 (rtx, rtx); +extern rtx gen_extendqisi2 (rtx, rtx); +extern rtx gen_truncxfsf2_i387_noop (rtx, rtx); +extern rtx gen_truncxfdf2_i387_noop (rtx, rtx); +static __inline__ rtx gen_fix_truncsfdi_sse (rtx, rtx); +static __inline__ rtx +gen_fix_truncsfdi_sse(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_fix_truncdfdi_sse (rtx, rtx); +static __inline__ rtx +gen_fix_truncdfdi_sse(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_fix_truncsfsi_sse (rtx, rtx); +extern rtx gen_fix_truncdfsi_sse (rtx, rtx); +extern rtx gen_fix_trunchi_fisttp_i387_1 (rtx, rtx); +extern rtx gen_fix_truncsi_fisttp_i387_1 (rtx, rtx); +extern rtx gen_fix_truncdi_fisttp_i387_1 (rtx, rtx); +extern rtx gen_fix_trunchi_i387_fisttp (rtx, rtx); +extern rtx gen_fix_truncsi_i387_fisttp (rtx, rtx); +extern rtx gen_fix_truncdi_i387_fisttp (rtx, rtx); +extern rtx gen_fix_trunchi_i387_fisttp_with_temp (rtx, rtx, rtx); +extern rtx gen_fix_truncsi_i387_fisttp_with_temp (rtx, rtx, rtx); +extern rtx gen_fix_truncdi_i387_fisttp_with_temp (rtx, rtx, rtx); +extern rtx gen_fix_truncdi_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_fix_truncdi_i387_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fix_trunchi_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_fix_truncsi_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_fix_trunchi_i387_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fix_truncsi_i387_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_x86_fnstcw_1 (rtx); +extern rtx gen_x86_fldcw_1 (rtx); +extern rtx gen_floathixf2 (rtx, rtx); +extern rtx gen_floatsixf2 (rtx, rtx); +extern rtx gen_floatdixf2 (rtx, rtx); +static __inline__ rtx gen_adddi3_carry_rex64 (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_adddi3_carry_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_addqi3_carry (rtx, rtx, rtx, rtx); +extern rtx gen_addhi3_carry (rtx, rtx, rtx, rtx); +extern rtx gen_addsi3_carry (rtx, rtx, rtx, rtx); +extern rtx gen_addqi3_cc (rtx, rtx, rtx); +static __inline__ rtx gen_addsi_1_zext (rtx, rtx, rtx); +static __inline__ rtx +gen_addsi_1_zext(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_addqi_ext_1 (rtx, rtx, rtx); +static __inline__ rtx gen_subdi3_carry_rex64 (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_subdi3_carry_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_subqi3_carry (rtx, rtx, rtx, rtx); +extern rtx gen_subhi3_carry (rtx, rtx, rtx, rtx); +extern rtx gen_subsi3_carry (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_subsi3_carry_zext (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_subsi3_carry_zext(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_divqi3 (rtx, rtx, rtx); +extern rtx gen_udivqi3 (rtx, rtx, rtx); +extern rtx gen_divmodhi4 (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_udivmoddi4 (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_udivmoddi4(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_udivmodsi4 (rtx, rtx, rtx, rtx); +extern rtx gen_testsi_1 (rtx, rtx); +extern rtx gen_andqi_ext_0 (rtx, rtx, rtx); +extern rtx gen_iorqi_ext_0 (rtx, rtx, rtx); +extern rtx gen_xorqi_ext_0 (rtx, rtx, rtx); +extern rtx gen_copysignsf3_const (rtx, rtx, rtx, rtx); +extern rtx gen_copysignsf3_var (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_copysigndf3_const (rtx, rtx, rtx, rtx); +extern rtx gen_copysigndf3_var (rtx, rtx, rtx, rtx, rtx, rtx); +static __inline__ rtx gen_ashlti3_1 (rtx, rtx, rtx); +static __inline__ rtx +gen_ashlti3_1(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_x86_64_shld (rtx, rtx, rtx); +static __inline__ rtx +gen_x86_64_shld(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_x86_shld_1 (rtx, rtx, rtx); +static __inline__ rtx gen_ashrti3_1 (rtx, rtx, rtx); +static __inline__ rtx +gen_ashrti3_1(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_x86_64_shrd (rtx, rtx, rtx); +static __inline__ rtx +gen_x86_64_shrd(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_x86_shrd_1 (rtx, rtx, rtx); +extern rtx gen_ashrsi3_31 (rtx, rtx, rtx); +static __inline__ rtx gen_lshrti3_1 (rtx, rtx, rtx); +static __inline__ rtx +gen_lshrti3_1(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_ix86_rotldi3 (rtx, rtx, rtx); +extern rtx gen_ix86_rotrdi3 (rtx, rtx, rtx); +extern rtx gen_jump (rtx); +extern rtx gen_blockage (rtx); +extern rtx gen_return_internal (void); +extern rtx gen_return_internal_long (void); +extern rtx gen_return_pop_internal (rtx); +extern rtx gen_return_indirect_internal (rtx); +extern rtx gen_nop (void); +extern rtx gen_align (rtx); +extern rtx gen_set_got (rtx); +extern rtx gen_set_got_labelled (rtx, rtx); +static __inline__ rtx gen_set_got_rex64 (rtx); +static __inline__ rtx +gen_set_got_rex64(rtx a __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_eh_return_si (rtx); +static __inline__ rtx gen_eh_return_di (rtx); +static __inline__ rtx +gen_eh_return_di(rtx a __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_leave (void); +static __inline__ rtx gen_leave_rex64 (void); +static __inline__ rtx +gen_leave_rex64(void) +{ + return 0; +} +extern rtx gen_ctzsi2 (rtx, rtx); +static __inline__ rtx gen_ctzdi2 (rtx, rtx); +static __inline__ rtx +gen_ctzdi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sqrtxf2 (rtx, rtx); +extern rtx gen_fpremxf4 (rtx, rtx, rtx, rtx); +extern rtx gen_fprem1xf4 (rtx, rtx, rtx, rtx); +extern rtx gen_sincosdf3 (rtx, rtx, rtx); +extern rtx gen_sincossf3 (rtx, rtx, rtx); +extern rtx gen_sincosxf3 (rtx, rtx, rtx); +extern rtx gen_atan2df3_1 (rtx, rtx, rtx); +extern rtx gen_atan2sf3_1 (rtx, rtx, rtx); +extern rtx gen_atan2xf3_1 (rtx, rtx, rtx); +extern rtx gen_fyl2x_xf3 (rtx, rtx, rtx); +extern rtx gen_fyl2xp1_xf3 (rtx, rtx, rtx); +extern rtx gen_frndintxf2 (rtx, rtx); +extern rtx gen_fistdi2 (rtx, rtx); +extern rtx gen_fistdi2_with_temp (rtx, rtx, rtx); +extern rtx gen_fisthi2 (rtx, rtx); +extern rtx gen_fistsi2 (rtx, rtx); +extern rtx gen_fisthi2_with_temp (rtx, rtx, rtx); +extern rtx gen_fistsi2_with_temp (rtx, rtx, rtx); +extern rtx gen_frndintxf2_floor (rtx, rtx); +extern rtx gen_frndintxf2_floor_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_fistdi2_floor (rtx, rtx, rtx, rtx); +extern rtx gen_fistdi2_floor_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fisthi2_floor (rtx, rtx, rtx, rtx); +extern rtx gen_fistsi2_floor (rtx, rtx, rtx, rtx); +extern rtx gen_fisthi2_floor_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fistsi2_floor_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_frndintxf2_ceil (rtx, rtx); +extern rtx gen_frndintxf2_ceil_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_fistdi2_ceil (rtx, rtx, rtx, rtx); +extern rtx gen_fistdi2_ceil_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fisthi2_ceil (rtx, rtx, rtx, rtx); +extern rtx gen_fistsi2_ceil (rtx, rtx, rtx, rtx); +extern rtx gen_fisthi2_ceil_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_fistsi2_ceil_with_temp (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_frndintxf2_trunc (rtx, rtx); +extern rtx gen_frndintxf2_trunc_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_frndintxf2_mask_pm (rtx, rtx); +extern rtx gen_frndintxf2_mask_pm_i387 (rtx, rtx, rtx, rtx); +extern rtx gen_cld (void); +static __inline__ rtx gen_x86_movdicc_0_m1_rex64 (rtx, rtx); +static __inline__ rtx +gen_x86_movdicc_0_m1_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_x86_movsicc_0_m1 (rtx, rtx); +extern rtx gen_sminsf3 (rtx, rtx, rtx); +extern rtx gen_smaxsf3 (rtx, rtx, rtx); +extern rtx gen_smindf3 (rtx, rtx, rtx); +extern rtx gen_smaxdf3 (rtx, rtx, rtx); +extern rtx gen_pro_epilogue_adjust_stack_1 (rtx, rtx, rtx); +static __inline__ rtx gen_pro_epilogue_adjust_stack_rex64 (rtx, rtx, rtx); +static __inline__ rtx +gen_pro_epilogue_adjust_stack_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_pro_epilogue_adjust_stack_rex64_2 (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_pro_epilogue_adjust_stack_rex64_2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_allocate_stack_worker_1 (rtx); +static __inline__ rtx gen_allocate_stack_worker_rex64 (rtx); +static __inline__ rtx +gen_allocate_stack_worker_rex64(rtx a __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_trap (void); +extern rtx gen_stack_protect_set_si (rtx, rtx); +static __inline__ rtx gen_stack_protect_set_di (rtx, rtx); +static __inline__ rtx +gen_stack_protect_set_di(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_stack_tls_protect_set_si (rtx, rtx); +static __inline__ rtx gen_stack_tls_protect_set_di (rtx, rtx); +static __inline__ rtx +gen_stack_tls_protect_set_di(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_stack_protect_test_si (rtx, rtx, rtx); +static __inline__ rtx gen_stack_protect_test_di (rtx, rtx, rtx); +static __inline__ rtx +gen_stack_protect_test_di(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_stack_tls_protect_test_si (rtx, rtx, rtx); +static __inline__ rtx gen_stack_tls_protect_test_di (rtx, rtx, rtx); +static __inline__ rtx +gen_stack_tls_protect_test_di(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse_movups (rtx, rtx); +extern rtx gen_sse2_movupd (rtx, rtx); +extern rtx gen_sse2_movdqu (rtx, rtx); +extern rtx gen_sse_movntv4sf (rtx, rtx); +extern rtx gen_sse2_movntv2df (rtx, rtx); +extern rtx gen_sse2_movntv2di (rtx, rtx); +extern rtx gen_sse2_movntsi (rtx, rtx); +extern rtx gen_sse3_lddqu (rtx, rtx); +extern rtx gen_sse_vmaddv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_vmsubv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_vmmulv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_vmdivv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_rcpv4sf2 (rtx, rtx); +extern rtx gen_sse_vmrcpv4sf2 (rtx, rtx, rtx); +extern rtx gen_sse_rsqrtv4sf2 (rtx, rtx); +extern rtx gen_sse_vmrsqrtv4sf2 (rtx, rtx, rtx); +extern rtx gen_sqrtv4sf2 (rtx, rtx); +extern rtx gen_sse_vmsqrtv4sf2 (rtx, rtx, rtx); +extern rtx gen_sse_vmsmaxv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_vmsminv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse3_addsubv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse3_haddv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse3_hsubv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_maskcmpv4sf3 (rtx, rtx, rtx, rtx); +extern rtx gen_sse_vmmaskcmpv4sf3 (rtx, rtx, rtx, rtx); +extern rtx gen_sse_comi (rtx, rtx); +extern rtx gen_sse_ucomi (rtx, rtx); +extern rtx gen_sse_nandv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_cvtpi2ps (rtx, rtx, rtx); +extern rtx gen_sse_cvtps2pi (rtx, rtx); +extern rtx gen_sse_cvttps2pi (rtx, rtx); +extern rtx gen_sse_cvtsi2ss (rtx, rtx, rtx); +static __inline__ rtx gen_sse_cvtsi2ssq (rtx, rtx, rtx); +static __inline__ rtx +gen_sse_cvtsi2ssq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse_cvtss2si (rtx, rtx); +static __inline__ rtx gen_sse_cvtss2siq (rtx, rtx); +static __inline__ rtx +gen_sse_cvtss2siq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse_cvttss2si (rtx, rtx); +static __inline__ rtx gen_sse_cvttss2siq (rtx, rtx); +static __inline__ rtx +gen_sse_cvttss2siq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse2_cvtdq2ps (rtx, rtx); +extern rtx gen_sse2_cvtps2dq (rtx, rtx); +extern rtx gen_sse2_cvttps2dq (rtx, rtx); +extern rtx gen_sse_movhlps (rtx, rtx, rtx); +extern rtx gen_sse_movlhps (rtx, rtx, rtx); +extern rtx gen_sse_unpckhps (rtx, rtx, rtx); +extern rtx gen_sse_unpcklps (rtx, rtx, rtx); +extern rtx gen_sse3_movshdup (rtx, rtx); +extern rtx gen_sse3_movsldup (rtx, rtx); +extern rtx gen_sse_shufps_1 (rtx, rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_sse_storehps (rtx, rtx); +extern rtx gen_sse_loadhps (rtx, rtx, rtx); +extern rtx gen_sse_storelps (rtx, rtx); +extern rtx gen_sse_loadlps (rtx, rtx, rtx); +extern rtx gen_sse_movss (rtx, rtx, rtx); +extern rtx gen_sse2_vmaddv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_vmsubv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_vmmulv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_vmdivv2df3 (rtx, rtx, rtx); +extern rtx gen_sqrtv2df2 (rtx, rtx); +extern rtx gen_sse2_vmsqrtv2df2 (rtx, rtx, rtx); +extern rtx gen_sse2_vmsmaxv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_vmsminv2df3 (rtx, rtx, rtx); +extern rtx gen_sse3_addsubv2df3 (rtx, rtx, rtx); +extern rtx gen_sse3_haddv2df3 (rtx, rtx, rtx); +extern rtx gen_sse3_hsubv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_maskcmpv2df3 (rtx, rtx, rtx, rtx); +extern rtx gen_sse2_vmmaskcmpv2df3 (rtx, rtx, rtx, rtx); +extern rtx gen_sse2_comi (rtx, rtx); +extern rtx gen_sse2_ucomi (rtx, rtx); +extern rtx gen_sse2_nandv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_cvtpi2pd (rtx, rtx); +extern rtx gen_sse2_cvtpd2pi (rtx, rtx); +extern rtx gen_sse2_cvttpd2pi (rtx, rtx); +extern rtx gen_sse2_cvtsi2sd (rtx, rtx, rtx); +static __inline__ rtx gen_sse2_cvtsi2sdq (rtx, rtx, rtx); +static __inline__ rtx +gen_sse2_cvtsi2sdq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse2_cvtsd2si (rtx, rtx); +static __inline__ rtx gen_sse2_cvtsd2siq (rtx, rtx); +static __inline__ rtx +gen_sse2_cvtsd2siq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse2_cvttsd2si (rtx, rtx); +static __inline__ rtx gen_sse2_cvttsd2siq (rtx, rtx); +static __inline__ rtx +gen_sse2_cvttsd2siq(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse2_cvtdq2pd (rtx, rtx); +extern rtx gen_sse2_cvtsd2ss (rtx, rtx, rtx); +extern rtx gen_sse2_cvtss2sd (rtx, rtx, rtx); +extern rtx gen_sse2_cvtps2pd (rtx, rtx); +extern rtx gen_sse2_unpckhpd (rtx, rtx, rtx); +extern rtx gen_sse2_unpcklpd (rtx, rtx, rtx); +extern rtx gen_sse2_shufpd_1 (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_sse2_storehpd (rtx, rtx); +extern rtx gen_sse2_storelpd (rtx, rtx); +extern rtx gen_sse2_loadhpd (rtx, rtx, rtx); +extern rtx gen_sse2_loadlpd (rtx, rtx, rtx); +extern rtx gen_sse2_movsd (rtx, rtx, rtx); +extern rtx gen_sse2_ssaddv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_ssaddv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_usaddv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_usaddv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_sssubv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_sssubv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_ussubv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_ussubv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_smulv8hi3_highpart (rtx, rtx, rtx); +extern rtx gen_sse2_umulv8hi3_highpart (rtx, rtx, rtx); +extern rtx gen_sse2_umulv2siv2di3 (rtx, rtx, rtx); +extern rtx gen_sse2_pmaddwd (rtx, rtx, rtx); +extern rtx gen_ashrv8hi3 (rtx, rtx, rtx); +extern rtx gen_ashrv4si3 (rtx, rtx, rtx); +extern rtx gen_lshrv8hi3 (rtx, rtx, rtx); +extern rtx gen_lshrv4si3 (rtx, rtx, rtx); +extern rtx gen_lshrv2di3 (rtx, rtx, rtx); +extern rtx gen_ashlv8hi3 (rtx, rtx, rtx); +extern rtx gen_ashlv4si3 (rtx, rtx, rtx); +extern rtx gen_ashlv2di3 (rtx, rtx, rtx); +extern rtx gen_sse2_ashlti3 (rtx, rtx, rtx); +extern rtx gen_sse2_lshrti3 (rtx, rtx, rtx); +extern rtx gen_sse2_eqv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_eqv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_eqv4si3 (rtx, rtx, rtx); +extern rtx gen_sse2_gtv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_gtv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_gtv4si3 (rtx, rtx, rtx); +extern rtx gen_sse2_nandv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_nandv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_nandv4si3 (rtx, rtx, rtx); +extern rtx gen_sse2_nandv2di3 (rtx, rtx, rtx); +extern rtx gen_sse2_packsswb (rtx, rtx, rtx); +extern rtx gen_sse2_packssdw (rtx, rtx, rtx); +extern rtx gen_sse2_packuswb (rtx, rtx, rtx); +extern rtx gen_sse2_punpckhbw (rtx, rtx, rtx); +extern rtx gen_sse2_punpcklbw (rtx, rtx, rtx); +extern rtx gen_sse2_punpckhwd (rtx, rtx, rtx); +extern rtx gen_sse2_punpcklwd (rtx, rtx, rtx); +extern rtx gen_sse2_punpckhdq (rtx, rtx, rtx); +extern rtx gen_sse2_punpckldq (rtx, rtx, rtx); +extern rtx gen_sse2_punpckhqdq (rtx, rtx, rtx); +extern rtx gen_sse2_punpcklqdq (rtx, rtx, rtx); +extern rtx gen_sse2_pextrw (rtx, rtx, rtx); +extern rtx gen_sse2_pshufd_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_sse2_pshuflw_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_sse2_pshufhw_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_sse2_loadld (rtx, rtx, rtx); +extern rtx gen_sse2_stored (rtx, rtx); +extern rtx gen_sse2_uavgv16qi3 (rtx, rtx, rtx); +extern rtx gen_sse2_uavgv8hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_psadbw (rtx, rtx, rtx); +extern rtx gen_sse_movmskps (rtx, rtx); +extern rtx gen_sse2_movmskpd (rtx, rtx); +extern rtx gen_sse2_pmovmskb (rtx, rtx); +extern rtx gen_sse_ldmxcsr (rtx); +extern rtx gen_sse_stmxcsr (rtx); +extern rtx gen_sse2_clflush (rtx); +extern rtx gen_sse3_mwait (rtx, rtx); +extern rtx gen_sse3_monitor (rtx, rtx, rtx); +static __inline__ rtx gen_sse3_monitor64 (rtx, rtx, rtx); +static __inline__ rtx +gen_sse3_monitor64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sse_movntdi (rtx, rtx); +extern rtx gen_mmx_addv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_subv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_mulv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_smaxv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_sminv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_rcpv2sf2 (rtx, rtx); +extern rtx gen_mmx_rcpit1v2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_rcpit2v2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_rsqrtv2sf2 (rtx, rtx); +extern rtx gen_mmx_rsqit1v2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_haddv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_hsubv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_addsubv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_gtv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_gev2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_eqv2sf3 (rtx, rtx, rtx); +extern rtx gen_mmx_pf2id (rtx, rtx); +extern rtx gen_mmx_pf2iw (rtx, rtx); +extern rtx gen_mmx_pi2fw (rtx, rtx); +extern rtx gen_mmx_floatv2si2 (rtx, rtx); +extern rtx gen_mmx_pswapdv2sf2 (rtx, rtx); +extern rtx gen_mmx_addv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_addv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_addv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_adddi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ssaddv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ssaddv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_usaddv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_usaddv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_subv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_subv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_subv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_subdi3 (rtx, rtx, rtx); +extern rtx gen_mmx_sssubv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_sssubv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ussubv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ussubv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_mulv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_smulv4hi3_highpart (rtx, rtx, rtx); +extern rtx gen_mmx_umulv4hi3_highpart (rtx, rtx, rtx); +extern rtx gen_mmx_pmaddwd (rtx, rtx, rtx); +extern rtx gen_mmx_pmulhrwv4hi3 (rtx, rtx, rtx); +extern rtx gen_sse2_umulsidi3 (rtx, rtx, rtx); +extern rtx gen_mmx_umaxv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_smaxv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_uminv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_sminv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ashrv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ashrv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_lshrv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_lshrv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_lshrdi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ashlv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_ashlv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_ashldi3 (rtx, rtx, rtx); +extern rtx gen_mmx_eqv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_eqv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_eqv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_gtv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_gtv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_gtv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_andv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_andv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_andv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_nandv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_nandv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_nandv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_iorv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_iorv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_iorv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_xorv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_xorv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_xorv2si3 (rtx, rtx, rtx); +extern rtx gen_mmx_packsswb (rtx, rtx, rtx); +extern rtx gen_mmx_packssdw (rtx, rtx, rtx); +extern rtx gen_mmx_packuswb (rtx, rtx, rtx); +extern rtx gen_mmx_punpckhbw (rtx, rtx, rtx); +extern rtx gen_mmx_punpcklbw (rtx, rtx, rtx); +extern rtx gen_mmx_punpckhwd (rtx, rtx, rtx); +extern rtx gen_mmx_punpcklwd (rtx, rtx, rtx); +extern rtx gen_mmx_punpckhdq (rtx, rtx, rtx); +extern rtx gen_mmx_punpckldq (rtx, rtx, rtx); +extern rtx gen_mmx_pextrw (rtx, rtx, rtx); +extern rtx gen_mmx_pshufw_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_mmx_pswapdv2si2 (rtx, rtx); +extern rtx gen_mmx_uavgv8qi3 (rtx, rtx, rtx); +extern rtx gen_mmx_uavgv4hi3 (rtx, rtx, rtx); +extern rtx gen_mmx_psadbw (rtx, rtx, rtx); +extern rtx gen_mmx_pmovmskb (rtx, rtx); +extern rtx gen_mmx_emms (void); +extern rtx gen_mmx_femms (void); +extern rtx gen_sync_double_compare_and_swapdi (rtx, rtx, rtx, rtx, rtx); +static __inline__ rtx gen_sync_double_compare_and_swapti (rtx, rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_sync_double_compare_and_swapti(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__)), rtx e __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_double_compare_and_swap_ccdi (rtx, rtx, rtx, rtx, rtx); +static __inline__ rtx gen_sync_double_compare_and_swap_ccti (rtx, rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_sync_double_compare_and_swap_ccti(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__)), rtx e __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_old_addqi (rtx, rtx, rtx); +extern rtx gen_sync_old_addhi (rtx, rtx, rtx); +extern rtx gen_sync_old_addsi (rtx, rtx, rtx); +static __inline__ rtx gen_sync_old_adddi (rtx, rtx, rtx); +static __inline__ rtx +gen_sync_old_adddi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_lock_test_and_setqi (rtx, rtx, rtx); +extern rtx gen_sync_lock_test_and_sethi (rtx, rtx, rtx); +extern rtx gen_sync_lock_test_and_setsi (rtx, rtx, rtx); +static __inline__ rtx gen_sync_lock_test_and_setdi (rtx, rtx, rtx); +static __inline__ rtx +gen_sync_lock_test_and_setdi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_addqi (rtx, rtx); +extern rtx gen_sync_addhi (rtx, rtx); +extern rtx gen_sync_addsi (rtx, rtx); +static __inline__ rtx gen_sync_adddi (rtx, rtx); +static __inline__ rtx +gen_sync_adddi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_subqi (rtx, rtx); +extern rtx gen_sync_subhi (rtx, rtx); +extern rtx gen_sync_subsi (rtx, rtx); +static __inline__ rtx gen_sync_subdi (rtx, rtx); +static __inline__ rtx +gen_sync_subdi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_iorqi (rtx, rtx); +extern rtx gen_sync_iorhi (rtx, rtx); +extern rtx gen_sync_iorsi (rtx, rtx); +static __inline__ rtx gen_sync_iordi (rtx, rtx); +static __inline__ rtx +gen_sync_iordi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_andqi (rtx, rtx); +extern rtx gen_sync_andhi (rtx, rtx); +extern rtx gen_sync_andsi (rtx, rtx); +static __inline__ rtx gen_sync_anddi (rtx, rtx); +static __inline__ rtx +gen_sync_anddi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_xorqi (rtx, rtx); +extern rtx gen_sync_xorhi (rtx, rtx); +extern rtx gen_sync_xorsi (rtx, rtx); +static __inline__ rtx gen_sync_xordi (rtx, rtx); +static __inline__ rtx +gen_sync_xordi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_cmpti (rtx, rtx); +static __inline__ rtx +gen_cmpti(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_cmpdi (rtx, rtx); +extern rtx gen_cmpsi (rtx, rtx); +extern rtx gen_cmphi (rtx, rtx); +extern rtx gen_cmpqi (rtx, rtx); +static __inline__ rtx gen_cmpdi_1_rex64 (rtx, rtx); +static __inline__ rtx +gen_cmpdi_1_rex64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_cmpsi_1 (rtx, rtx); +extern rtx gen_cmpqi_ext_3 (rtx, rtx); +extern rtx gen_cmpxf (rtx, rtx); +extern rtx gen_cmpdf (rtx, rtx); +extern rtx gen_cmpsf (rtx, rtx); +extern rtx gen_movsi (rtx, rtx); +extern rtx gen_movhi (rtx, rtx); +extern rtx gen_movstricthi (rtx, rtx); +extern rtx gen_movqi (rtx, rtx); +extern rtx gen_reload_outqi (rtx, rtx, rtx); +extern rtx gen_movstrictqi (rtx, rtx); +extern rtx gen_movdi (rtx, rtx); +extern rtx gen_movti (rtx, rtx); +extern rtx gen_movsf (rtx, rtx); +extern rtx gen_movdf (rtx, rtx); +extern rtx gen_movxf (rtx, rtx); +static __inline__ rtx gen_movtf (rtx, rtx); +static __inline__ rtx +gen_movtf(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_zero_extendhisi2 (rtx, rtx); +extern rtx gen_zero_extendqihi2 (rtx, rtx); +extern rtx gen_zero_extendqisi2 (rtx, rtx); +extern rtx gen_zero_extendsidi2 (rtx, rtx); +extern rtx gen_extendsidi2 (rtx, rtx); +extern rtx gen_extendsfdf2 (rtx, rtx); +extern rtx gen_extendsfxf2 (rtx, rtx); +extern rtx gen_extenddfxf2 (rtx, rtx); +extern rtx gen_truncdfsf2 (rtx, rtx); +extern rtx gen_truncdfsf2_with_temp (rtx, rtx, rtx); +extern rtx gen_truncxfsf2 (rtx, rtx); +extern rtx gen_truncxfdf2 (rtx, rtx); +extern rtx gen_fix_truncxfdi2 (rtx, rtx); +extern rtx gen_fix_truncsfdi2 (rtx, rtx); +extern rtx gen_fix_truncdfdi2 (rtx, rtx); +extern rtx gen_fix_truncxfsi2 (rtx, rtx); +extern rtx gen_fix_truncsfsi2 (rtx, rtx); +extern rtx gen_fix_truncdfsi2 (rtx, rtx); +extern rtx gen_fix_truncsfhi2 (rtx, rtx); +extern rtx gen_fix_truncdfhi2 (rtx, rtx); +extern rtx gen_fix_truncxfhi2 (rtx, rtx); +extern rtx gen_floathisf2 (rtx, rtx); +extern rtx gen_floatsisf2 (rtx, rtx); +extern rtx gen_floatdisf2 (rtx, rtx); +extern rtx gen_floathidf2 (rtx, rtx); +extern rtx gen_floatsidf2 (rtx, rtx); +extern rtx gen_floatdidf2 (rtx, rtx); +extern rtx gen_floatunssisf2 (rtx, rtx); +static __inline__ rtx gen_floatunsdisf2 (rtx, rtx); +static __inline__ rtx +gen_floatunsdisf2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_floatunsdidf2 (rtx, rtx); +static __inline__ rtx +gen_floatunsdidf2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_addti3 (rtx, rtx, rtx); +static __inline__ rtx +gen_addti3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_adddi3 (rtx, rtx, rtx); +extern rtx gen_addsi3 (rtx, rtx, rtx); +extern rtx gen_addhi3 (rtx, rtx, rtx); +extern rtx gen_addqi3 (rtx, rtx, rtx); +extern rtx gen_addxf3 (rtx, rtx, rtx); +extern rtx gen_adddf3 (rtx, rtx, rtx); +extern rtx gen_addsf3 (rtx, rtx, rtx); +static __inline__ rtx gen_subti3 (rtx, rtx, rtx); +static __inline__ rtx +gen_subti3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_subdi3 (rtx, rtx, rtx); +extern rtx gen_subsi3 (rtx, rtx, rtx); +extern rtx gen_subhi3 (rtx, rtx, rtx); +extern rtx gen_subqi3 (rtx, rtx, rtx); +extern rtx gen_subxf3 (rtx, rtx, rtx); +extern rtx gen_subdf3 (rtx, rtx, rtx); +extern rtx gen_subsf3 (rtx, rtx, rtx); +static __inline__ rtx gen_muldi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_muldi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_mulsi3 (rtx, rtx, rtx); +extern rtx gen_mulhi3 (rtx, rtx, rtx); +extern rtx gen_mulqi3 (rtx, rtx, rtx); +extern rtx gen_umulqihi3 (rtx, rtx, rtx); +extern rtx gen_mulqihi3 (rtx, rtx, rtx); +static __inline__ rtx gen_umulditi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_umulditi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_umulsidi3 (rtx, rtx, rtx); +static __inline__ rtx gen_mulditi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_mulditi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_mulsidi3 (rtx, rtx, rtx); +static __inline__ rtx gen_umuldi3_highpart (rtx, rtx, rtx); +static __inline__ rtx +gen_umuldi3_highpart(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_umulsi3_highpart (rtx, rtx, rtx); +static __inline__ rtx gen_smuldi3_highpart (rtx, rtx, rtx); +static __inline__ rtx +gen_smuldi3_highpart(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_smulsi3_highpart (rtx, rtx, rtx); +extern rtx gen_mulxf3 (rtx, rtx, rtx); +extern rtx gen_muldf3 (rtx, rtx, rtx); +extern rtx gen_mulsf3 (rtx, rtx, rtx); +extern rtx gen_divxf3 (rtx, rtx, rtx); +extern rtx gen_divdf3 (rtx, rtx, rtx); +extern rtx gen_divsf3 (rtx, rtx, rtx); +static __inline__ rtx gen_divmoddi4 (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_divmoddi4(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_divmodsi4 (rtx, rtx, rtx, rtx); +extern rtx gen_udivmodhi4 (rtx, rtx, rtx, rtx); +extern rtx gen_testsi_ccno_1 (rtx, rtx); +extern rtx gen_testqi_ccz_1 (rtx, rtx); +extern rtx gen_testqi_ext_ccno_0 (rtx, rtx); +static __inline__ rtx gen_anddi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_anddi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_andsi3 (rtx, rtx, rtx); +extern rtx gen_andhi3 (rtx, rtx, rtx); +extern rtx gen_andqi3 (rtx, rtx, rtx); +static __inline__ rtx gen_iordi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_iordi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_iorsi3 (rtx, rtx, rtx); +extern rtx gen_iorhi3 (rtx, rtx, rtx); +extern rtx gen_iorqi3 (rtx, rtx, rtx); +static __inline__ rtx gen_xordi3 (rtx, rtx, rtx); +static __inline__ rtx +gen_xordi3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_xorsi3 (rtx, rtx, rtx); +extern rtx gen_xorhi3 (rtx, rtx, rtx); +extern rtx gen_xorqi3 (rtx, rtx, rtx); +extern rtx gen_xorqi_cc_ext_1 (rtx, rtx, rtx); +static __inline__ rtx gen_negti2 (rtx, rtx); +static __inline__ rtx +gen_negti2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_negdi2 (rtx, rtx); +extern rtx gen_negsi2 (rtx, rtx); +extern rtx gen_neghi2 (rtx, rtx); +extern rtx gen_negqi2 (rtx, rtx); +extern rtx gen_negsf2 (rtx, rtx); +extern rtx gen_abssf2 (rtx, rtx); +extern rtx gen_copysignsf3 (rtx, rtx, rtx); +extern rtx gen_negdf2 (rtx, rtx); +extern rtx gen_absdf2 (rtx, rtx); +extern rtx gen_copysigndf3 (rtx, rtx, rtx); +extern rtx gen_negxf2 (rtx, rtx); +extern rtx gen_absxf2 (rtx, rtx); +static __inline__ rtx gen_one_cmpldi2 (rtx, rtx); +static __inline__ rtx +gen_one_cmpldi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_one_cmplsi2 (rtx, rtx); +extern rtx gen_one_cmplhi2 (rtx, rtx); +extern rtx gen_one_cmplqi2 (rtx, rtx); +static __inline__ rtx gen_ashlti3 (rtx, rtx, rtx); +static __inline__ rtx +gen_ashlti3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +static __inline__ rtx gen_x86_64_shift_adj (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_x86_64_shift_adj(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_ashldi3 (rtx, rtx, rtx); +extern rtx gen_x86_shift_adj_1 (rtx, rtx, rtx, rtx); +extern rtx gen_x86_shift_adj_2 (rtx, rtx, rtx); +extern rtx gen_ashlsi3 (rtx, rtx, rtx); +extern rtx gen_ashlhi3 (rtx, rtx, rtx); +extern rtx gen_ashlqi3 (rtx, rtx, rtx); +static __inline__ rtx gen_ashrti3 (rtx, rtx, rtx); +static __inline__ rtx +gen_ashrti3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_ashrdi3 (rtx, rtx, rtx); +extern rtx gen_x86_shift_adj_3 (rtx, rtx, rtx); +extern rtx gen_ashrsi3 (rtx, rtx, rtx); +extern rtx gen_ashrhi3 (rtx, rtx, rtx); +extern rtx gen_ashrqi3 (rtx, rtx, rtx); +static __inline__ rtx gen_lshrti3 (rtx, rtx, rtx); +static __inline__ rtx +gen_lshrti3(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_lshrdi3 (rtx, rtx, rtx); +extern rtx gen_lshrsi3 (rtx, rtx, rtx); +extern rtx gen_lshrhi3 (rtx, rtx, rtx); +extern rtx gen_lshrqi3 (rtx, rtx, rtx); +extern rtx gen_rotldi3 (rtx, rtx, rtx); +extern rtx gen_rotlsi3 (rtx, rtx, rtx); +extern rtx gen_rotlhi3 (rtx, rtx, rtx); +extern rtx gen_rotlqi3 (rtx, rtx, rtx); +extern rtx gen_rotrdi3 (rtx, rtx, rtx); +extern rtx gen_rotrsi3 (rtx, rtx, rtx); +extern rtx gen_rotrhi3 (rtx, rtx, rtx); +extern rtx gen_rotrqi3 (rtx, rtx, rtx); +extern rtx gen_extv (rtx, rtx, rtx, rtx); +extern rtx gen_extzv (rtx, rtx, rtx, rtx); +extern rtx gen_insv (rtx, rtx, rtx, rtx); +extern rtx gen_seq (rtx); +extern rtx gen_sne (rtx); +extern rtx gen_sgt (rtx); +extern rtx gen_sgtu (rtx); +extern rtx gen_slt (rtx); +extern rtx gen_sltu (rtx); +extern rtx gen_sge (rtx); +extern rtx gen_sgeu (rtx); +extern rtx gen_sle (rtx); +extern rtx gen_sleu (rtx); +extern rtx gen_sunordered (rtx); +extern rtx gen_sordered (rtx); +extern rtx gen_suneq (rtx); +extern rtx gen_sunge (rtx); +extern rtx gen_sungt (rtx); +extern rtx gen_sunle (rtx); +extern rtx gen_sunlt (rtx); +extern rtx gen_sltgt (rtx); +extern rtx gen_beq (rtx); +extern rtx gen_bne (rtx); +extern rtx gen_bgt (rtx); +extern rtx gen_bgtu (rtx); +extern rtx gen_blt (rtx); +extern rtx gen_bltu (rtx); +extern rtx gen_bge (rtx); +extern rtx gen_bgeu (rtx); +extern rtx gen_ble (rtx); +extern rtx gen_bleu (rtx); +extern rtx gen_bunordered (rtx); +extern rtx gen_bordered (rtx); +extern rtx gen_buneq (rtx); +extern rtx gen_bunge (rtx); +extern rtx gen_bungt (rtx); +extern rtx gen_bunle (rtx); +extern rtx gen_bunlt (rtx); +extern rtx gen_bltgt (rtx); +extern rtx gen_indirect_jump (rtx); +extern rtx gen_tablejump (rtx, rtx); + +extern rtx gen_call_pop (rtx, rtx, rtx, rtx); + +extern rtx gen_call (rtx, rtx, rtx); + +extern rtx gen_sibcall (rtx, rtx, rtx); + +extern rtx gen_call_value_pop (rtx, rtx, rtx, rtx, rtx); + +extern rtx gen_call_value (rtx, rtx, rtx, rtx); + +extern rtx gen_sibcall_value (rtx, rtx, rtx, rtx); +extern rtx gen_untyped_call (rtx, rtx, rtx); +extern rtx gen_return (void); +extern rtx gen_prologue (void); +extern rtx gen_epilogue (void); +extern rtx gen_sibcall_epilogue (void); +extern rtx gen_eh_return (rtx); +extern rtx gen_ffssi2 (rtx, rtx); +static __inline__ rtx gen_ffsdi2 (rtx, rtx); +static __inline__ rtx +gen_ffsdi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_clzsi2 (rtx, rtx); +static __inline__ rtx gen_clzdi2 (rtx, rtx); +static __inline__ rtx +gen_clzdi2(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_tls_global_dynamic_32 (rtx, rtx); +extern rtx gen_tls_global_dynamic_64 (rtx, rtx); +extern rtx gen_tls_local_dynamic_base_32 (rtx); +extern rtx gen_tls_local_dynamic_base_64 (rtx); +extern rtx gen_tls_dynamic_gnu2_32 (rtx, rtx, rtx); +static __inline__ rtx gen_tls_dynamic_gnu2_64 (rtx, rtx); +static __inline__ rtx +gen_tls_dynamic_gnu2_64(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sqrtsf2 (rtx, rtx); +extern rtx gen_sqrtdf2 (rtx, rtx); +extern rtx gen_fmodsf3 (rtx, rtx, rtx); +extern rtx gen_fmoddf3 (rtx, rtx, rtx); +extern rtx gen_fmodxf3 (rtx, rtx, rtx); +extern rtx gen_dremsf3 (rtx, rtx, rtx); +extern rtx gen_dremdf3 (rtx, rtx, rtx); +extern rtx gen_dremxf3 (rtx, rtx, rtx); +extern rtx gen_tandf2 (rtx, rtx); +extern rtx gen_tansf2 (rtx, rtx); +extern rtx gen_tanxf2 (rtx, rtx); +extern rtx gen_atan2df3 (rtx, rtx, rtx); +extern rtx gen_atandf2 (rtx, rtx); +extern rtx gen_atan2sf3 (rtx, rtx, rtx); +extern rtx gen_atansf2 (rtx, rtx); +extern rtx gen_atan2xf3 (rtx, rtx, rtx); +extern rtx gen_atanxf2 (rtx, rtx); +extern rtx gen_asindf2 (rtx, rtx); +extern rtx gen_asinsf2 (rtx, rtx); +extern rtx gen_asinxf2 (rtx, rtx); +extern rtx gen_acosdf2 (rtx, rtx); +extern rtx gen_acossf2 (rtx, rtx); +extern rtx gen_acosxf2 (rtx, rtx); +extern rtx gen_logsf2 (rtx, rtx); +extern rtx gen_logdf2 (rtx, rtx); +extern rtx gen_logxf2 (rtx, rtx); +extern rtx gen_log10sf2 (rtx, rtx); +extern rtx gen_log10df2 (rtx, rtx); +extern rtx gen_log10xf2 (rtx, rtx); +extern rtx gen_log2sf2 (rtx, rtx); +extern rtx gen_log2df2 (rtx, rtx); +extern rtx gen_log2xf2 (rtx, rtx); +extern rtx gen_log1psf2 (rtx, rtx); +extern rtx gen_log1pdf2 (rtx, rtx); +extern rtx gen_log1pxf2 (rtx, rtx); +extern rtx gen_logbsf2 (rtx, rtx); +extern rtx gen_logbdf2 (rtx, rtx); +extern rtx gen_logbxf2 (rtx, rtx); +extern rtx gen_ilogbsi2 (rtx, rtx, rtx, rtx); +extern rtx gen_expsf2 (rtx, rtx); +extern rtx gen_expdf2 (rtx, rtx); +extern rtx gen_expxf2 (rtx, rtx); +extern rtx gen_exp10sf2 (rtx, rtx); +extern rtx gen_exp10df2 (rtx, rtx); +extern rtx gen_exp10xf2 (rtx, rtx); +extern rtx gen_exp2sf2 (rtx, rtx); +extern rtx gen_exp2df2 (rtx, rtx); +extern rtx gen_exp2xf2 (rtx, rtx); +extern rtx gen_expm1df2 (rtx, rtx); +extern rtx gen_expm1sf2 (rtx, rtx); +extern rtx gen_expm1xf2 (rtx, rtx); +extern rtx gen_ldexpdf3 (rtx, rtx, rtx); +extern rtx gen_ldexpsf3 (rtx, rtx, rtx); +extern rtx gen_ldexpxf3 (rtx, rtx, rtx); +extern rtx gen_rintdf2 (rtx, rtx); +extern rtx gen_rintsf2 (rtx, rtx); +extern rtx gen_rintxf2 (rtx, rtx); +extern rtx gen_lrinthi2 (rtx, rtx); +extern rtx gen_lrintsi2 (rtx, rtx); +extern rtx gen_lrintdi2 (rtx, rtx); +extern rtx gen_floorxf2 (rtx, rtx); +extern rtx gen_floordf2 (rtx, rtx); +extern rtx gen_floorsf2 (rtx, rtx); +extern rtx gen_lfloorhi2 (rtx, rtx); +extern rtx gen_lfloorsi2 (rtx, rtx); +extern rtx gen_lfloordi2 (rtx, rtx); +extern rtx gen_ceilxf2 (rtx, rtx); +extern rtx gen_ceildf2 (rtx, rtx); +extern rtx gen_ceilsf2 (rtx, rtx); +extern rtx gen_lceilhi2 (rtx, rtx); +extern rtx gen_lceilsi2 (rtx, rtx); +extern rtx gen_lceildi2 (rtx, rtx); +extern rtx gen_btruncxf2 (rtx, rtx); +extern rtx gen_btruncdf2 (rtx, rtx); +extern rtx gen_btruncsf2 (rtx, rtx); +extern rtx gen_nearbyintxf2 (rtx, rtx); +extern rtx gen_nearbyintdf2 (rtx, rtx); +extern rtx gen_nearbyintsf2 (rtx, rtx); +extern rtx gen_movmemsi (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_movmemdi (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_movmemdi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_strmov (rtx, rtx, rtx, rtx); +extern rtx gen_strmov_singleop (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_rep_mov (rtx, rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_setmemsi (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_setmemdi (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_setmemdi(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_strset (rtx, rtx, rtx); +extern rtx gen_strset_singleop (rtx, rtx, rtx, rtx); +extern rtx gen_rep_stos (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_cmpstrnsi (rtx, rtx, rtx, rtx, rtx); +extern rtx gen_cmpintqi (rtx); +extern rtx gen_cmpstrnqi_nz_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_cmpstrnqi_1 (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_strlensi (rtx, rtx, rtx, rtx); +extern rtx gen_strlendi (rtx, rtx, rtx, rtx); +extern rtx gen_strlenqi_1 (rtx, rtx, rtx); +static __inline__ rtx gen_movdicc (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_movdicc(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_movsicc (rtx, rtx, rtx, rtx); +extern rtx gen_movhicc (rtx, rtx, rtx, rtx); +extern rtx gen_movqicc (rtx, rtx, rtx, rtx); +extern rtx gen_movsfcc (rtx, rtx, rtx, rtx); +extern rtx gen_movdfcc (rtx, rtx, rtx, rtx); +extern rtx gen_movxfcc (rtx, rtx, rtx, rtx); +extern rtx gen_addqicc (rtx, rtx, rtx, rtx); +extern rtx gen_addhicc (rtx, rtx, rtx, rtx); +extern rtx gen_addsicc (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_adddicc (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_adddicc(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_allocate_stack_worker (rtx); +extern rtx gen_allocate_stack_worker_postreload (rtx); +extern rtx gen_allocate_stack_worker_rex64_postreload (rtx); +extern rtx gen_allocate_stack (rtx, rtx); +extern rtx gen_builtin_setjmp_receiver (rtx); +static __inline__ rtx gen_sse_prologue_save (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_sse_prologue_save(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_prefetch (rtx, rtx, rtx); +extern rtx gen_stack_protect_set (rtx, rtx); +extern rtx gen_stack_protect_test (rtx, rtx, rtx); +extern rtx gen_movv16qi (rtx, rtx); +extern rtx gen_movv8hi (rtx, rtx); +extern rtx gen_movv4si (rtx, rtx); +extern rtx gen_movv2di (rtx, rtx); +extern rtx gen_movv4sf (rtx, rtx); +extern rtx gen_movv2df (rtx, rtx); +extern rtx gen_pushv16qi1 (rtx); +extern rtx gen_pushv8hi1 (rtx); +extern rtx gen_pushv4si1 (rtx); +extern rtx gen_pushv2di1 (rtx); +extern rtx gen_pushv4sf1 (rtx); +extern rtx gen_pushv2df1 (rtx); +extern rtx gen_movmisalignv16qi (rtx, rtx); +extern rtx gen_movmisalignv8hi (rtx, rtx); +extern rtx gen_movmisalignv4si (rtx, rtx); +extern rtx gen_movmisalignv2di (rtx, rtx); +extern rtx gen_movmisalignv4sf (rtx, rtx); +extern rtx gen_movmisalignv2df (rtx, rtx); +extern rtx gen_negv4sf2 (rtx, rtx); +extern rtx gen_absv4sf2 (rtx, rtx); +extern rtx gen_addv4sf3 (rtx, rtx, rtx); +extern rtx gen_subv4sf3 (rtx, rtx, rtx); +extern rtx gen_mulv4sf3 (rtx, rtx, rtx); +extern rtx gen_divv4sf3 (rtx, rtx, rtx); +extern rtx gen_smaxv4sf3 (rtx, rtx, rtx); +extern rtx gen_sminv4sf3 (rtx, rtx, rtx); +extern rtx gen_reduc_splus_v4sf (rtx, rtx); +extern rtx gen_reduc_smax_v4sf (rtx, rtx); +extern rtx gen_reduc_smin_v4sf (rtx, rtx); +extern rtx gen_vcondv4sf (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_andv4sf3 (rtx, rtx, rtx); +extern rtx gen_iorv4sf3 (rtx, rtx, rtx); +extern rtx gen_xorv4sf3 (rtx, rtx, rtx); +extern rtx gen_sse_shufps (rtx, rtx, rtx, rtx); +extern rtx gen_vec_initv4sf (rtx, rtx); +extern rtx gen_vec_setv4sf (rtx, rtx, rtx); +extern rtx gen_vec_extractv4sf (rtx, rtx, rtx); +extern rtx gen_negv2df2 (rtx, rtx); +extern rtx gen_absv2df2 (rtx, rtx); +extern rtx gen_addv2df3 (rtx, rtx, rtx); +extern rtx gen_subv2df3 (rtx, rtx, rtx); +extern rtx gen_mulv2df3 (rtx, rtx, rtx); +extern rtx gen_divv2df3 (rtx, rtx, rtx); +extern rtx gen_smaxv2df3 (rtx, rtx, rtx); +extern rtx gen_sminv2df3 (rtx, rtx, rtx); +extern rtx gen_reduc_splus_v2df (rtx, rtx); +extern rtx gen_vcondv2df (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_andv2df3 (rtx, rtx, rtx); +extern rtx gen_iorv2df3 (rtx, rtx, rtx); +extern rtx gen_xorv2df3 (rtx, rtx, rtx); +extern rtx gen_sse2_cvtpd2dq (rtx, rtx); +extern rtx gen_sse2_cvttpd2dq (rtx, rtx); +extern rtx gen_sse2_cvtpd2ps (rtx, rtx); +extern rtx gen_sse2_shufpd (rtx, rtx, rtx, rtx); +extern rtx gen_vec_setv2df (rtx, rtx, rtx); +extern rtx gen_vec_extractv2df (rtx, rtx, rtx); +extern rtx gen_vec_initv2df (rtx, rtx); +extern rtx gen_negv16qi2 (rtx, rtx); +extern rtx gen_negv8hi2 (rtx, rtx); +extern rtx gen_negv4si2 (rtx, rtx); +extern rtx gen_negv2di2 (rtx, rtx); +extern rtx gen_addv16qi3 (rtx, rtx, rtx); +extern rtx gen_addv8hi3 (rtx, rtx, rtx); +extern rtx gen_addv4si3 (rtx, rtx, rtx); +extern rtx gen_addv2di3 (rtx, rtx, rtx); +extern rtx gen_subv16qi3 (rtx, rtx, rtx); +extern rtx gen_subv8hi3 (rtx, rtx, rtx); +extern rtx gen_subv4si3 (rtx, rtx, rtx); +extern rtx gen_subv2di3 (rtx, rtx, rtx); +extern rtx gen_mulv16qi3 (rtx, rtx, rtx); +extern rtx gen_mulv8hi3 (rtx, rtx, rtx); +extern rtx gen_mulv4si3 (rtx, rtx, rtx); +extern rtx gen_mulv2di3 (rtx, rtx, rtx); +extern rtx gen_sdot_prodv8hi (rtx, rtx, rtx, rtx); +extern rtx gen_udot_prodv4si (rtx, rtx, rtx, rtx); +extern rtx gen_vec_shl_v16qi (rtx, rtx, rtx); +extern rtx gen_vec_shl_v8hi (rtx, rtx, rtx); +extern rtx gen_vec_shl_v4si (rtx, rtx, rtx); +extern rtx gen_vec_shl_v2di (rtx, rtx, rtx); +extern rtx gen_vec_shr_v16qi (rtx, rtx, rtx); +extern rtx gen_vec_shr_v8hi (rtx, rtx, rtx); +extern rtx gen_vec_shr_v4si (rtx, rtx, rtx); +extern rtx gen_vec_shr_v2di (rtx, rtx, rtx); +extern rtx gen_umaxv16qi3 (rtx, rtx, rtx); +extern rtx gen_smaxv8hi3 (rtx, rtx, rtx); +extern rtx gen_umaxv8hi3 (rtx, rtx, rtx); +extern rtx gen_smaxv16qi3 (rtx, rtx, rtx); +extern rtx gen_smaxv4si3 (rtx, rtx, rtx); +extern rtx gen_umaxv4si3 (rtx, rtx, rtx); +extern rtx gen_uminv16qi3 (rtx, rtx, rtx); +extern rtx gen_sminv8hi3 (rtx, rtx, rtx); +extern rtx gen_sminv16qi3 (rtx, rtx, rtx); +extern rtx gen_sminv4si3 (rtx, rtx, rtx); +extern rtx gen_uminv8hi3 (rtx, rtx, rtx); +extern rtx gen_uminv4si3 (rtx, rtx, rtx); +extern rtx gen_vcondv16qi (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_vcondv8hi (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_vcondv4si (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_vconduv16qi (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_vconduv8hi (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_vconduv4si (rtx, rtx, rtx, rtx, rtx, rtx); +extern rtx gen_one_cmplv16qi2 (rtx, rtx); +extern rtx gen_one_cmplv8hi2 (rtx, rtx); +extern rtx gen_one_cmplv4si2 (rtx, rtx); +extern rtx gen_one_cmplv2di2 (rtx, rtx); +extern rtx gen_andv16qi3 (rtx, rtx, rtx); +extern rtx gen_andv8hi3 (rtx, rtx, rtx); +extern rtx gen_andv4si3 (rtx, rtx, rtx); +extern rtx gen_andv2di3 (rtx, rtx, rtx); +extern rtx gen_iorv16qi3 (rtx, rtx, rtx); +extern rtx gen_iorv8hi3 (rtx, rtx, rtx); +extern rtx gen_iorv4si3 (rtx, rtx, rtx); +extern rtx gen_iorv2di3 (rtx, rtx, rtx); +extern rtx gen_xorv16qi3 (rtx, rtx, rtx); +extern rtx gen_xorv8hi3 (rtx, rtx, rtx); +extern rtx gen_xorv4si3 (rtx, rtx, rtx); +extern rtx gen_xorv2di3 (rtx, rtx, rtx); +extern rtx gen_sse2_pinsrw (rtx, rtx, rtx, rtx); +extern rtx gen_sse2_pshufd (rtx, rtx, rtx); +extern rtx gen_sse2_pshuflw (rtx, rtx, rtx); +extern rtx gen_sse2_pshufhw (rtx, rtx, rtx); +extern rtx gen_sse2_loadd (rtx, rtx); +extern rtx gen_sse_storeq (rtx, rtx); +extern rtx gen_vec_setv2di (rtx, rtx, rtx); +extern rtx gen_vec_extractv2di (rtx, rtx, rtx); +extern rtx gen_vec_initv2di (rtx, rtx); +extern rtx gen_vec_setv4si (rtx, rtx, rtx); +extern rtx gen_vec_extractv4si (rtx, rtx, rtx); +extern rtx gen_vec_initv4si (rtx, rtx); +extern rtx gen_vec_setv8hi (rtx, rtx, rtx); +extern rtx gen_vec_extractv8hi (rtx, rtx, rtx); +extern rtx gen_vec_initv8hi (rtx, rtx); +extern rtx gen_vec_setv16qi (rtx, rtx, rtx); +extern rtx gen_vec_extractv16qi (rtx, rtx, rtx); +extern rtx gen_vec_initv16qi (rtx, rtx); +extern rtx gen_sse2_maskmovdqu (rtx, rtx, rtx); +extern rtx gen_sse_sfence (void); +extern rtx gen_sse2_mfence (void); +extern rtx gen_sse2_lfence (void); +extern rtx gen_movv8qi (rtx, rtx); +extern rtx gen_movv4hi (rtx, rtx); +extern rtx gen_movv2si (rtx, rtx); +extern rtx gen_movv2sf (rtx, rtx); +extern rtx gen_pushv8qi1 (rtx); +extern rtx gen_pushv4hi1 (rtx); +extern rtx gen_pushv2si1 (rtx); +extern rtx gen_pushv2sf1 (rtx); +extern rtx gen_movmisalignv8qi (rtx, rtx); +extern rtx gen_movmisalignv4hi (rtx, rtx); +extern rtx gen_movmisalignv2si (rtx, rtx); +extern rtx gen_movmisalignv2sf (rtx, rtx); +extern rtx gen_mmx_subrv2sf3 (rtx, rtx, rtx); +extern rtx gen_vec_setv2sf (rtx, rtx, rtx); +extern rtx gen_vec_extractv2sf (rtx, rtx, rtx); +extern rtx gen_vec_initv2sf (rtx, rtx); +extern rtx gen_mmx_pinsrw (rtx, rtx, rtx, rtx); +extern rtx gen_mmx_pshufw (rtx, rtx, rtx); +extern rtx gen_vec_setv2si (rtx, rtx, rtx); +extern rtx gen_vec_extractv2si (rtx, rtx, rtx); +extern rtx gen_vec_initv2si (rtx, rtx); +extern rtx gen_vec_setv4hi (rtx, rtx, rtx); +extern rtx gen_vec_extractv4hi (rtx, rtx, rtx); +extern rtx gen_vec_initv4hi (rtx, rtx); +extern rtx gen_vec_setv8qi (rtx, rtx, rtx); +extern rtx gen_vec_extractv8qi (rtx, rtx, rtx); +extern rtx gen_vec_initv8qi (rtx, rtx); +extern rtx gen_mmx_maskmovq (rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swapqi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swaphi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swapsi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swapdi (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_sync_compare_and_swapti (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_sync_compare_and_swapti(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +extern rtx gen_sync_compare_and_swap_ccqi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swap_cchi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swap_ccsi (rtx, rtx, rtx, rtx); +extern rtx gen_sync_compare_and_swap_ccdi (rtx, rtx, rtx, rtx); +static __inline__ rtx gen_sync_compare_and_swap_ccti (rtx, rtx, rtx, rtx); +static __inline__ rtx +gen_sync_compare_and_swap_ccti(rtx a __attribute__ ((__unused__)), rtx b __attribute__ ((__unused__)), rtx c __attribute__ ((__unused__)), rtx d __attribute__ ((__unused__))) +{ + return 0; +} +# 21 "./tm.h" 2 +# 43 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/tree.h" 1 +# 24 "../../GCC/gcc/tree.h" +# 1 "../../GCC/gcc/../include/hashtab.h" 1 +# 46 "../../GCC/gcc/../include/hashtab.h" +typedef unsigned int hashval_t; + + + + +typedef hashval_t (*htab_hash) (const void *); + + + + + + +typedef int (*htab_eq) (const void *, const void *); + + + +typedef void (*htab_del) (void *); + + + + + +typedef int (*htab_trav) (void **, void *); + + + + + +typedef void *(*htab_alloc) (size_t, size_t); + + +typedef void (*htab_free) (void *); + + + +typedef void *(*htab_alloc_with_arg) (void *, size_t, size_t); +typedef void (*htab_free_with_arg) (void *, void *); +# 99 "../../GCC/gcc/../include/hashtab.h" +struct htab +{ + + htab_hash hash_f; + + + htab_eq eq_f; + + + htab_del del_f; + + + void ** entries; + + + size_t size; + + + size_t n_elements; + + + size_t n_deleted; + + + + unsigned int searches; + + + + unsigned int collisions; + + + htab_alloc alloc_f; + htab_free free_f; + + + void * alloc_arg; + htab_alloc_with_arg alloc_with_arg_f; + htab_free_with_arg free_with_arg_f; + + + + unsigned int size_prime_index; +}; + +typedef struct htab *htab_t; + + +enum insert_option {NO_INSERT, INSERT}; + + + +extern htab_t htab_create_alloc (size_t, htab_hash, + htab_eq, htab_del, + htab_alloc, htab_free); + +extern htab_t htab_create_alloc_ex (size_t, htab_hash, + htab_eq, htab_del, + void *, htab_alloc_with_arg, + htab_free_with_arg); + + +extern htab_t htab_create (size_t, htab_hash, htab_eq, htab_del); +extern htab_t htab_try_create (size_t, htab_hash, htab_eq, htab_del); + +extern void htab_set_functions_ex (htab_t, htab_hash, + htab_eq, htab_del, + void *, htab_alloc_with_arg, + htab_free_with_arg); + +extern void htab_delete (htab_t); +extern void htab_empty (htab_t); + +extern void * htab_find (htab_t, const void *); +extern void ** htab_find_slot (htab_t, const void *, enum insert_option); +extern void * htab_find_with_hash (htab_t, const void *, hashval_t); +extern void ** htab_find_slot_with_hash (htab_t, const void *, + hashval_t, enum insert_option); +extern void htab_clear_slot (htab_t, void **); +extern void htab_remove_elt (htab_t, void *); +extern void htab_remove_elt_with_hash (htab_t, void *, hashval_t); + +extern void htab_traverse (htab_t, htab_trav, void *); +extern void htab_traverse_noresize (htab_t, htab_trav, void *); + +extern size_t htab_size (htab_t); +extern size_t htab_elements (htab_t); +extern double htab_collisions (htab_t); + + +extern htab_hash htab_hash_pointer; + + +extern htab_eq htab_eq_pointer; + + +extern hashval_t htab_hash_string (const void *); + + +extern hashval_t iterative_hash (const void *, size_t, hashval_t); +# 25 "../../GCC/gcc/tree.h" 2 +# 1 "../../GCC/gcc/machmode.h" 1 +# 25 "../../GCC/gcc/machmode.h" +# 1 "./insn-modes.h" 1 + + + + + + +enum machine_mode +{ + VOIDmode, + BLKmode, + CCmode, + CCGCmode, + CCGOCmode, + CCNOmode, + CCZmode, + CCFPmode, + CCFPUmode, + BImode, + QImode, + HImode, + SImode, + DImode, + TImode, + SFmode, + DFmode, + XFmode, + TFmode, + SDmode, + DDmode, + TDmode, + CQImode, + CHImode, + CSImode, + CDImode, + CTImode, + SCmode, + DCmode, + XCmode, + TCmode, + V4QImode, + V2HImode, + V8QImode, + V4HImode, + V2SImode, + V16QImode, + V8HImode, + V4SImode, + V2DImode, + V32QImode, + V16HImode, + V8SImode, + V4DImode, + V2SFmode, + V4SFmode, + V2DFmode, + V8SFmode, + V4DFmode, + MAX_MACHINE_MODE, + + MIN_MODE_RANDOM = VOIDmode, + MAX_MODE_RANDOM = BLKmode, + + MIN_MODE_CC = CCmode, + MAX_MODE_CC = CCFPUmode, + + MIN_MODE_INT = QImode, + MAX_MODE_INT = TImode, + + MIN_MODE_PARTIAL_INT = VOIDmode, + MAX_MODE_PARTIAL_INT = VOIDmode, + + MIN_MODE_FLOAT = SFmode, + MAX_MODE_FLOAT = TFmode, + + MIN_MODE_DECIMAL_FLOAT = SDmode, + MAX_MODE_DECIMAL_FLOAT = TDmode, + + MIN_MODE_COMPLEX_INT = CQImode, + MAX_MODE_COMPLEX_INT = CTImode, + + MIN_MODE_COMPLEX_FLOAT = SCmode, + MAX_MODE_COMPLEX_FLOAT = TCmode, + + MIN_MODE_VECTOR_INT = V4QImode, + MAX_MODE_VECTOR_INT = V4DImode, + + MIN_MODE_VECTOR_FLOAT = V2SFmode, + MAX_MODE_VECTOR_FLOAT = V4DFmode, + + NUM_MACHINE_MODES = MAX_MACHINE_MODE +}; +# 26 "../../GCC/gcc/machmode.h" 2 + + + +extern const char * const mode_name[NUM_MACHINE_MODES]; + + + + +# 1 "../../GCC/gcc/mode-classes.def" 1 +# 35 "../../GCC/gcc/machmode.h" 2 + +enum mode_class { MODE_RANDOM, MODE_CC, MODE_INT, MODE_PARTIAL_INT, MODE_FLOAT, MODE_DECIMAL_FLOAT, MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MODE_VECTOR_INT, MODE_VECTOR_FLOAT, MAX_MODE_CLASS }; + + + + + + +extern const unsigned char mode_class[NUM_MACHINE_MODES]; +# 93 "../../GCC/gcc/machmode.h" +extern unsigned char mode_size[NUM_MACHINE_MODES]; + + + + +extern const unsigned short mode_precision[NUM_MACHINE_MODES]; + + + + + +extern const unsigned long mode_mask_array[NUM_MACHINE_MODES]; + + + + + +extern const unsigned char mode_inner[NUM_MACHINE_MODES]; +# 122 "../../GCC/gcc/machmode.h" +extern const unsigned char mode_nunits[NUM_MACHINE_MODES]; + + + + +extern const unsigned char mode_wider[NUM_MACHINE_MODES]; + + +extern const unsigned char mode_2xwider[NUM_MACHINE_MODES]; + + + + + + +extern enum machine_mode mode_for_size (unsigned int, enum mode_class, int); + + + +extern enum machine_mode smallest_mode_for_size (unsigned int, + enum mode_class); + + + + + +extern enum machine_mode int_mode_for_mode (enum machine_mode); + + + +extern enum machine_mode get_best_mode (int, int, unsigned int, + enum machine_mode, int); + + + +extern unsigned char mode_base_align[NUM_MACHINE_MODES]; + +extern unsigned get_mode_alignment (enum machine_mode); + + + + + +extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS]; + + + + + +extern enum machine_mode byte_mode; +extern enum machine_mode word_mode; +extern enum machine_mode ptr_mode; + + +extern void init_adjust_machine_modes (void); +# 26 "../../GCC/gcc/tree.h" 2 +# 1 "../../GCC/gcc/input.h" 1 +# 25 "../../GCC/gcc/input.h" +# 1 "../../GCC/gcc/../libcpp/include/line-map.h" 1 +# 31 "../../GCC/gcc/../libcpp/include/line-map.h" +enum lc_reason {LC_ENTER = 0, LC_LEAVE, LC_RENAME}; + + + + +typedef unsigned int source_location; +# 50 "../../GCC/gcc/../libcpp/include/line-map.h" +struct line_map +{ + const char *to_file; + unsigned int to_line; + source_location start_location; + int included_from; + __extension__ enum lc_reason reason : 8; + + unsigned char sysp; + + unsigned int column_bits : 8; +}; + + +struct line_maps +{ + struct line_map *maps; + unsigned int allocated; + unsigned int used; + + unsigned int cache; + + + + + int last_listed; + + + unsigned int depth; + + + unsigned char trace_includes; + + + source_location highest_location; + + + source_location highest_line; + + + + unsigned int max_column_hint; +}; + + +extern void linemap_init (struct line_maps *); + + +extern void linemap_free (struct line_maps *); + + + +extern void linemap_check_files_exited (struct line_maps *); + + + + + + + +extern source_location linemap_line_start +(struct line_maps *set, unsigned int to_line, unsigned int max_column_hint); +# 124 "../../GCC/gcc/../libcpp/include/line-map.h" +extern const struct line_map *linemap_add + (struct line_maps *, enum lc_reason, unsigned int sysp, + const char *to_file, unsigned int to_line); + + + +extern const struct line_map *linemap_lookup + (struct line_maps *, source_location); + + + + +extern void linemap_print_containing_files (struct line_maps *, + const struct line_map *); +# 178 "../../GCC/gcc/../libcpp/include/line-map.h" +extern source_location +linemap_position_for_column (struct line_maps *set, unsigned int to_column); +# 26 "../../GCC/gcc/input.h" 2 +extern struct line_maps line_table; +# 52 "../../GCC/gcc/input.h" +struct location_s +{ + + const char *file; + + + int line; +}; + +typedef struct location_s expanded_location; +typedef struct location_s location_t; +typedef location_t *source_locus; + + +extern location_t unknown_location; + + + + +struct file_stack +{ + struct file_stack *next; + location_t location; +}; + + +extern const char *main_input_filename; + +extern location_t input_location; + + + +extern void push_srcloc (const char *name, int line); + +extern void pop_srcloc (void); +extern void restore_input_file_stack (int); +# 97 "../../GCC/gcc/input.h" +extern struct file_stack *input_file_stack; + + +extern int input_file_stack_tick; +# 27 "../../GCC/gcc/tree.h" 2 +# 1 "../../GCC/gcc/statistics.h" 1 +# 28 "../../GCC/gcc/tree.h" 2 +# 1 "../../GCC/gcc/vec.h" 1 +# 411 "../../GCC/gcc/vec.h" +extern void *vec_gc_p_reserve (void *, int ); +extern void *vec_gc_p_reserve_exact (void *, int ); +extern void *vec_gc_o_reserve (void *, int, size_t, size_t ); +extern void *vec_gc_o_reserve_exact (void *, int, size_t, size_t + ); +extern void ggc_free (void *); + +extern void *vec_heap_p_reserve (void *, int ); +extern void *vec_heap_p_reserve_exact (void *, int ); +extern void *vec_heap_o_reserve (void *, int, size_t, size_t ); +extern void *vec_heap_o_reserve_exact (void *, int, size_t, size_t + ); +# 29 "../../GCC/gcc/tree.h" 2 + + + + + +enum tree_code { +# 1 "../../GCC/gcc/tree.def" 1 +# 42 "../../GCC/gcc/tree.def" +ERROR_MARK, + + + + + +IDENTIFIER_NODE, + + + + + + +TREE_LIST, + + +TREE_VEC, +# 79 "../../GCC/gcc/tree.def" +BLOCK, +# 133 "../../GCC/gcc/tree.def" +OFFSET_TYPE, +# 146 "../../GCC/gcc/tree.def" +ENUMERAL_TYPE, + + + +BOOLEAN_TYPE, +# 160 "../../GCC/gcc/tree.def" +INTEGER_TYPE, + + + +REAL_TYPE, +# 173 "../../GCC/gcc/tree.def" +POINTER_TYPE, + + + +REFERENCE_TYPE, + + + + + + + +COMPLEX_TYPE, + + + + +VECTOR_TYPE, +# 206 "../../GCC/gcc/tree.def" +ARRAY_TYPE, +# 216 "../../GCC/gcc/tree.def" +RECORD_TYPE, + + + + + +UNION_TYPE, + + + + + +QUAL_UNION_TYPE, + + + + + + +VOID_TYPE, + + + + + + + +FUNCTION_TYPE, + + + + + + +METHOD_TYPE, + + + + + +LANG_TYPE, +# 270 "../../GCC/gcc/tree.def" +INTEGER_CST, + + +REAL_CST, + + + +COMPLEX_CST, + + +VECTOR_CST, + + +STRING_CST, +# 343 "../../GCC/gcc/tree.def" +FUNCTION_DECL, +LABEL_DECL, + + + + +FIELD_DECL, +VAR_DECL, +CONST_DECL, +PARM_DECL, +TYPE_DECL, +RESULT_DECL, + + + +STRUCT_FIELD_TAG, +NAME_MEMORY_TAG, +SYMBOL_MEMORY_TAG, + + + +NAMESPACE_DECL, + + + +TRANSLATION_UNIT_DECL, +# 378 "../../GCC/gcc/tree.def" +COMPONENT_REF, +# 387 "../../GCC/gcc/tree.def" +BIT_FIELD_REF, + + + + + + +INDIRECT_REF, + + + +ALIGN_INDIRECT_REF, + + + + + + +MISALIGNED_INDIRECT_REF, + + + + + + +ARRAY_REF, + + + + +ARRAY_RANGE_REF, +# 429 "../../GCC/gcc/tree.def" +OBJ_TYPE_REF, + + +EXC_PTR_EXPR, + + +FILTER_EXPR, +# 451 "../../GCC/gcc/tree.def" +CONSTRUCTOR, +# 461 "../../GCC/gcc/tree.def" +COMPOUND_EXPR, + + +MODIFY_EXPR, + + + + +INIT_EXPR, + + + + + + + +TARGET_EXPR, +# 487 "../../GCC/gcc/tree.def" +COND_EXPR, +# 499 "../../GCC/gcc/tree.def" +VEC_COND_EXPR, +# 522 "../../GCC/gcc/tree.def" +BIND_EXPR, + + + + + +CALL_EXPR, + + + + + + +WITH_CLEANUP_EXPR, +# 552 "../../GCC/gcc/tree.def" +CLEANUP_POINT_EXPR, +# 604 "../../GCC/gcc/tree.def" +PLACEHOLDER_EXPR, + + +PLUS_EXPR, +MINUS_EXPR, +MULT_EXPR, + + +TRUNC_DIV_EXPR, + + +CEIL_DIV_EXPR, + + +FLOOR_DIV_EXPR, + + +ROUND_DIV_EXPR, + + +TRUNC_MOD_EXPR, +CEIL_MOD_EXPR, +FLOOR_MOD_EXPR, +ROUND_MOD_EXPR, + + +RDIV_EXPR, + + + +EXACT_DIV_EXPR, + + + + + + +FIX_TRUNC_EXPR, +FIX_CEIL_EXPR, +FIX_FLOOR_EXPR, +FIX_ROUND_EXPR, + + +FLOAT_EXPR, + + +NEGATE_EXPR, + + + + +MIN_EXPR, +MAX_EXPR, + + + + + +ABS_EXPR, +# 671 "../../GCC/gcc/tree.def" +LSHIFT_EXPR, +RSHIFT_EXPR, +LROTATE_EXPR, +RROTATE_EXPR, + + +BIT_IOR_EXPR, +BIT_XOR_EXPR, +BIT_AND_EXPR, +BIT_NOT_EXPR, +# 691 "../../GCC/gcc/tree.def" +TRUTH_ANDIF_EXPR, +TRUTH_ORIF_EXPR, +TRUTH_AND_EXPR, +TRUTH_OR_EXPR, +TRUTH_XOR_EXPR, +TRUTH_NOT_EXPR, + + + + + + + +LT_EXPR, +LE_EXPR, +GT_EXPR, +GE_EXPR, +EQ_EXPR, +NE_EXPR, + + +UNORDERED_EXPR, +ORDERED_EXPR, + + +UNLT_EXPR, +UNLE_EXPR, +UNGT_EXPR, +UNGE_EXPR, +UNEQ_EXPR, + + +LTGT_EXPR, + +RANGE_EXPR, + + + + +CONVERT_EXPR, + + +NOP_EXPR, + + +NON_LVALUE_EXPR, +# 748 "../../GCC/gcc/tree.def" +VIEW_CONVERT_EXPR, + + + + +SAVE_EXPR, + + + +ADDR_EXPR, + + + +FDESC_EXPR, + + + +COMPLEX_EXPR, + + +CONJ_EXPR, + + + +REALPART_EXPR, +IMAGPART_EXPR, + + + + +PREDECREMENT_EXPR, +PREINCREMENT_EXPR, +POSTDECREMENT_EXPR, +POSTINCREMENT_EXPR, + + +VA_ARG_EXPR, + + + + + + +TRY_CATCH_EXPR, + + + + +TRY_FINALLY_EXPR, + + + + + +DECL_EXPR, + + + + +LABEL_EXPR, + + + +GOTO_EXPR, + + + + + + +RETURN_EXPR, + + + +EXIT_EXPR, + + + + +LOOP_EXPR, +# 841 "../../GCC/gcc/tree.def" +SWITCH_EXPR, + + + + + +CASE_LABEL_EXPR, + + + +RESX_EXPR, + + + + + +ASM_EXPR, + + + + +SSA_NAME, + + + + + + + +PHI_NODE, + + + +CATCH_EXPR, + + + + + +EH_FILTER_EXPR, + + + +SCEV_KNOWN, + + + +SCEV_NOT_KNOWN, + + + +POLYNOMIAL_CHREC, + + + +STATEMENT_LIST, + + + + + +VALUE_HANDLE, +# 916 "../../GCC/gcc/tree.def" +ASSERT_EXPR, + + + +TREE_BINFO, + + + + + + +WITH_SIZE_EXPR, +# 938 "../../GCC/gcc/tree.def" +REALIGN_LOAD_EXPR, +# 953 "../../GCC/gcc/tree.def" +TARGET_MEM_REF, +# 967 "../../GCC/gcc/tree.def" +OMP_PARALLEL, +# 988 "../../GCC/gcc/tree.def" +OMP_FOR, + + + + +OMP_SECTIONS, + + + + +OMP_SINGLE, + + + +OMP_SECTION, + + + +OMP_MASTER, + + + +OMP_ORDERED, + + + + +OMP_CRITICAL, + + +OMP_RETURN, + + + +OMP_CONTINUE, + + + + + + + +OMP_ATOMIC, + + +OMP_CLAUSE, + + + + + + + +REDUC_MAX_EXPR, +REDUC_MIN_EXPR, +REDUC_PLUS_EXPR, +# 1054 "../../GCC/gcc/tree.def" +DOT_PROD_EXPR, +# 1063 "../../GCC/gcc/tree.def" +WIDEN_SUM_EXPR, + + + + + + +WIDEN_MULT_EXPR, + + + + +VEC_LSHIFT_EXPR, +VEC_RSHIFT_EXPR, +# 36 "../../GCC/gcc/tree.h" 2 + + LAST_AND_UNUSED_TREE_CODE + +}; + + + +extern unsigned char tree_contains_struct[256][64]; +# 54 "../../GCC/gcc/tree.h" +enum tree_code_class { + tcc_exceptional, + tcc_constant, + + tcc_type, + tcc_declaration, + tcc_reference, + tcc_comparison, + tcc_unary, + tcc_binary, + tcc_statement, + + tcc_expression +}; + + + + +extern const char *const tree_code_class_strings[]; + + + + + + + +extern const enum tree_code_class tree_code_type[]; +# 185 "../../GCC/gcc/tree.h" +extern const unsigned char tree_code_length[]; + + + + +extern const char *const tree_code_name[]; + + +static __inline__ void VEC_tree_must_be_pointer_type (void) { (void)((tree)1 == (void *)1); } typedef struct VEC_tree_base { unsigned num; unsigned alloc; tree vec[1]; } VEC_tree_base; typedef struct VEC_tree_none { VEC_tree_base base; } VEC_tree_none; static __inline__ unsigned VEC_tree_base_length (const VEC_tree_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ tree VEC_tree_base_last (const VEC_tree_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ tree VEC_tree_base_index (const VEC_tree_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_tree_base_iterate (const VEC_tree_base *vec_, unsigned ix_, tree *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_tree_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_tree_base, vec) + alloc_ * sizeof(tree); } static __inline__ void VEC_tree_base_embedded_init (VEC_tree_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_tree_base_space (VEC_tree_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ tree *VEC_tree_base_quick_push (VEC_tree_base *vec_, tree obj_ ) { tree *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ tree VEC_tree_base_pop (VEC_tree_base *vec_ ) { tree obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_tree_base_truncate (VEC_tree_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ tree VEC_tree_base_replace (VEC_tree_base *vec_, unsigned ix_, tree obj_ ) { tree old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ tree *VEC_tree_base_quick_insert (VEC_tree_base *vec_, unsigned ix_, tree obj_ ) { tree *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (tree)); *slot_ = obj_; return slot_; } static __inline__ tree VEC_tree_base_ordered_remove (VEC_tree_base *vec_, unsigned ix_ ) { tree *slot_; tree obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (tree)); return obj_; } static __inline__ tree VEC_tree_base_unordered_remove (VEC_tree_base *vec_, unsigned ix_ ) { tree *slot_; tree obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_tree_base_block_remove (VEC_tree_base *vec_, unsigned ix_, unsigned len_ ) { tree *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (tree)); } static __inline__ tree *VEC_tree_base_address (VEC_tree_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_tree_base_lower_bound (VEC_tree_base *vec_, const tree obj_, unsigned char (*lessthan_)(const tree, const tree) ) { unsigned int len_ = VEC_tree_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { tree middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_tree_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_tree_gc { VEC_tree_base base; } VEC_tree_gc; static __inline__ VEC_tree_gc *VEC_tree_gc_alloc (int alloc_ ) { return (VEC_tree_gc *) vec_gc_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_tree_gc_free (VEC_tree_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_tree_gc *VEC_tree_gc_copy (VEC_tree_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_tree_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_tree_gc *)(vec_gc_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (tree) * len_); } return new_vec_; } static __inline__ int VEC_tree_gc_reserve (VEC_tree_gc **vec_, int alloc_ ) { int extend = !VEC_tree_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_tree_gc *) vec_gc_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_tree_gc_reserve_exact (VEC_tree_gc **vec_, int alloc_ ) { int extend = !VEC_tree_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_tree_gc *) vec_gc_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_tree_gc_safe_grow (VEC_tree_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_tree_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_tree_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ tree *VEC_tree_gc_safe_push (VEC_tree_gc **vec_, tree obj_ ) { VEC_tree_gc_reserve (vec_, 1 ); return VEC_tree_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ tree *VEC_tree_gc_safe_insert (VEC_tree_gc **vec_, unsigned ix_, tree obj_ ) { VEC_tree_gc_reserve (vec_, 1 ); return VEC_tree_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; +typedef struct VEC_tree_heap { VEC_tree_base base; } VEC_tree_heap; static __inline__ VEC_tree_heap *VEC_tree_heap_alloc (int alloc_ ) { return (VEC_tree_heap *) vec_heap_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_tree_heap_free (VEC_tree_heap **vec_) { if (*vec_) free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_tree_heap *VEC_tree_heap_copy (VEC_tree_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_tree_heap *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_tree_heap *)(vec_heap_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (tree) * len_); } return new_vec_; } static __inline__ int VEC_tree_heap_reserve (VEC_tree_heap **vec_, int alloc_ ) { int extend = !VEC_tree_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_tree_heap *) vec_heap_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_tree_heap_reserve_exact (VEC_tree_heap **vec_, int alloc_ ) { int extend = !VEC_tree_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_tree_heap *) vec_heap_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_tree_heap_safe_grow (VEC_tree_heap **vec_, int size_ ) { (void)(size_ >= 0 && VEC_tree_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_tree_heap_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ tree *VEC_tree_heap_safe_push (VEC_tree_heap **vec_, tree obj_ ) { VEC_tree_heap_reserve (vec_, 1 ); return VEC_tree_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ tree *VEC_tree_heap_safe_insert (VEC_tree_heap **vec_, unsigned ix_, tree obj_ ) { VEC_tree_heap_reserve (vec_, 1 ); return VEC_tree_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; + + + + +enum built_in_class +{ + NOT_BUILT_IN = 0, + BUILT_IN_FRONTEND, + BUILT_IN_MD, + BUILT_IN_NORMAL +}; + + +extern const char *const built_in_class_names[4]; + + + + + +enum built_in_function +{ +# 1 "../../GCC/gcc/builtins.def" 1 +# 176 "../../GCC/gcc/builtins.def" +BUILT_IN_ACOS, +BUILT_IN_ACOSF, +BUILT_IN_ACOSH, +BUILT_IN_ACOSHF, +BUILT_IN_ACOSHL, +BUILT_IN_ACOSL, +BUILT_IN_ASIN, +BUILT_IN_ASINF, +BUILT_IN_ASINH, +BUILT_IN_ASINHF, +BUILT_IN_ASINHL, +BUILT_IN_ASINL, +BUILT_IN_ATAN, +BUILT_IN_ATAN2, +BUILT_IN_ATAN2F, +BUILT_IN_ATAN2L, +BUILT_IN_ATANF, +BUILT_IN_ATANH, +BUILT_IN_ATANHF, +BUILT_IN_ATANHL, +BUILT_IN_ATANL, +BUILT_IN_CBRT, +BUILT_IN_CBRTF, +BUILT_IN_CBRTL, +BUILT_IN_CEIL, +BUILT_IN_CEILF, +BUILT_IN_CEILL, +BUILT_IN_COPYSIGN, +BUILT_IN_COPYSIGNF, +BUILT_IN_COPYSIGNL, +BUILT_IN_COS, +BUILT_IN_COSF, +BUILT_IN_COSH, +BUILT_IN_COSHF, +BUILT_IN_COSHL, +BUILT_IN_COSL, +BUILT_IN_DREM, +BUILT_IN_DREMF, +BUILT_IN_DREML, +BUILT_IN_ERF, +BUILT_IN_ERFC, +BUILT_IN_ERFCF, +BUILT_IN_ERFCL, +BUILT_IN_ERFF, +BUILT_IN_ERFL, +BUILT_IN_EXP, +BUILT_IN_EXP10, +BUILT_IN_EXP10F, +BUILT_IN_EXP10L, +BUILT_IN_EXP2, +BUILT_IN_EXP2F, +BUILT_IN_EXP2L, +BUILT_IN_EXPF, +BUILT_IN_EXPL, +BUILT_IN_EXPM1, +BUILT_IN_EXPM1F, +BUILT_IN_EXPM1L, +BUILT_IN_FABS, +BUILT_IN_FABSF, +BUILT_IN_FABSL, +BUILT_IN_FDIM, +BUILT_IN_FDIMF, +BUILT_IN_FDIML, +BUILT_IN_FLOOR, +BUILT_IN_FLOORF, +BUILT_IN_FLOORL, +BUILT_IN_FMA, +BUILT_IN_FMAF, +BUILT_IN_FMAL, +BUILT_IN_FMAX, +BUILT_IN_FMAXF, +BUILT_IN_FMAXL, +BUILT_IN_FMIN, +BUILT_IN_FMINF, +BUILT_IN_FMINL, +BUILT_IN_FMOD, +BUILT_IN_FMODF, +BUILT_IN_FMODL, +BUILT_IN_FREXP, +BUILT_IN_FREXPF, +BUILT_IN_FREXPL, +BUILT_IN_GAMMA, +BUILT_IN_GAMMAF, +BUILT_IN_GAMMAL, +BUILT_IN_HUGE_VAL, +BUILT_IN_HUGE_VALF, +BUILT_IN_HUGE_VALL, +BUILT_IN_HYPOT, +BUILT_IN_HYPOTF, +BUILT_IN_HYPOTL, +BUILT_IN_ILOGB, +BUILT_IN_ILOGBF, +BUILT_IN_ILOGBL, +BUILT_IN_INF, +BUILT_IN_INFF, +BUILT_IN_INFL, +BUILT_IN_INFD32, +BUILT_IN_INFD64, +BUILT_IN_INFD128, +BUILT_IN_J0, +BUILT_IN_J0F, +BUILT_IN_J0L, +BUILT_IN_J1, +BUILT_IN_J1F, +BUILT_IN_J1L, +BUILT_IN_JN, +BUILT_IN_JNF, +BUILT_IN_JNL, +BUILT_IN_LCEIL, +BUILT_IN_LCEILF, +BUILT_IN_LCEILL, +BUILT_IN_LDEXP, +BUILT_IN_LDEXPF, +BUILT_IN_LDEXPL, +BUILT_IN_LFLOOR, +BUILT_IN_LFLOORF, +BUILT_IN_LFLOORL, +BUILT_IN_LGAMMA, +BUILT_IN_LGAMMAF, +BUILT_IN_LGAMMAL, +BUILT_IN_LLCEIL, +BUILT_IN_LLCEILF, +BUILT_IN_LLCEILL, +BUILT_IN_LLFLOOR, +BUILT_IN_LLFLOORF, +BUILT_IN_LLFLOORL, +BUILT_IN_LLRINT, +BUILT_IN_LLRINTF, +BUILT_IN_LLRINTL, +BUILT_IN_LLROUND, +BUILT_IN_LLROUNDF, +BUILT_IN_LLROUNDL, +BUILT_IN_LOG, +BUILT_IN_LOG10, +BUILT_IN_LOG10F, +BUILT_IN_LOG10L, +BUILT_IN_LOG1P, +BUILT_IN_LOG1PF, +BUILT_IN_LOG1PL, +BUILT_IN_LOG2, +BUILT_IN_LOG2F, +BUILT_IN_LOG2L, +BUILT_IN_LOGB, +BUILT_IN_LOGBF, +BUILT_IN_LOGBL, +BUILT_IN_LOGF, +BUILT_IN_LOGL, +BUILT_IN_LRINT, +BUILT_IN_LRINTF, +BUILT_IN_LRINTL, +BUILT_IN_LROUND, +BUILT_IN_LROUNDF, +BUILT_IN_LROUNDL, +BUILT_IN_MODF, +BUILT_IN_MODFF, +BUILT_IN_MODFL, +BUILT_IN_NAN, +BUILT_IN_NANF, +BUILT_IN_NANL, +BUILT_IN_NAND32, +BUILT_IN_NAND64, +BUILT_IN_NAND128, +BUILT_IN_NANS, +BUILT_IN_NANSF, +BUILT_IN_NANSL, +BUILT_IN_NEARBYINT, +BUILT_IN_NEARBYINTF, +BUILT_IN_NEARBYINTL, +BUILT_IN_NEXTAFTER, +BUILT_IN_NEXTAFTERF, +BUILT_IN_NEXTAFTERL, +BUILT_IN_NEXTTOWARD, +BUILT_IN_NEXTTOWARDF, +BUILT_IN_NEXTTOWARDL, +BUILT_IN_POW, +BUILT_IN_POW10, +BUILT_IN_POW10F, +BUILT_IN_POW10L, +BUILT_IN_POWF, +BUILT_IN_POWI, +BUILT_IN_POWIF, +BUILT_IN_POWIL, +BUILT_IN_POWL, +BUILT_IN_REMAINDER, +BUILT_IN_REMAINDERF, +BUILT_IN_REMAINDERL, +BUILT_IN_REMQUO, +BUILT_IN_REMQUOF, +BUILT_IN_REMQUOL, +BUILT_IN_RINT, +BUILT_IN_RINTF, +BUILT_IN_RINTL, +BUILT_IN_ROUND, +BUILT_IN_ROUNDF, +BUILT_IN_ROUNDL, +BUILT_IN_SCALB, +BUILT_IN_SCALBF, +BUILT_IN_SCALBL, +BUILT_IN_SCALBLN, +BUILT_IN_SCALBLNF, +BUILT_IN_SCALBLNL, +BUILT_IN_SCALBN, +BUILT_IN_SCALBNF, +BUILT_IN_SCALBNL, +BUILT_IN_SIGNBIT, +BUILT_IN_SIGNBITF, +BUILT_IN_SIGNBITL, +BUILT_IN_SIGNIFICAND, +BUILT_IN_SIGNIFICANDF, +BUILT_IN_SIGNIFICANDL, +BUILT_IN_SIN, +BUILT_IN_SINCOS, +BUILT_IN_SINCOSF, +BUILT_IN_SINCOSL, +BUILT_IN_SINF, +BUILT_IN_SINH, +BUILT_IN_SINHF, +BUILT_IN_SINHL, +BUILT_IN_SINL, +BUILT_IN_SQRT, +BUILT_IN_SQRTF, +BUILT_IN_SQRTL, +BUILT_IN_TAN, +BUILT_IN_TANF, +BUILT_IN_TANH, +BUILT_IN_TANHF, +BUILT_IN_TANHL, +BUILT_IN_TANL, +BUILT_IN_TGAMMA, +BUILT_IN_TGAMMAF, +BUILT_IN_TGAMMAL, +BUILT_IN_TRUNC, +BUILT_IN_TRUNCF, +BUILT_IN_TRUNCL, +BUILT_IN_Y0, +BUILT_IN_Y0F, +BUILT_IN_Y0L, +BUILT_IN_Y1, +BUILT_IN_Y1F, +BUILT_IN_Y1L, +BUILT_IN_YN, +BUILT_IN_YNF, +BUILT_IN_YNL, + + +BUILT_IN_CABS, +BUILT_IN_CABSF, +BUILT_IN_CABSL, +BUILT_IN_CACOS, +BUILT_IN_CACOSF, +BUILT_IN_CACOSH, +BUILT_IN_CACOSHF, +BUILT_IN_CACOSHL, +BUILT_IN_CACOSL, +BUILT_IN_CARG, +BUILT_IN_CARGF, +BUILT_IN_CARGL, +BUILT_IN_CASIN, +BUILT_IN_CASINF, +BUILT_IN_CASINH, +BUILT_IN_CASINHF, +BUILT_IN_CASINHL, +BUILT_IN_CASINL, +BUILT_IN_CATAN, +BUILT_IN_CATANF, +BUILT_IN_CATANH, +BUILT_IN_CATANHF, +BUILT_IN_CATANHL, +BUILT_IN_CATANL, +BUILT_IN_CCOS, +BUILT_IN_CCOSF, +BUILT_IN_CCOSH, +BUILT_IN_CCOSHF, +BUILT_IN_CCOSHL, +BUILT_IN_CCOSL, +BUILT_IN_CEXP, +BUILT_IN_CEXPF, +BUILT_IN_CEXPL, +BUILT_IN_CIMAG, +BUILT_IN_CIMAGF, +BUILT_IN_CIMAGL, +BUILT_IN_CLOG, +BUILT_IN_CLOGF, +BUILT_IN_CLOGL, +BUILT_IN_CLOG10, +BUILT_IN_CLOG10F, +BUILT_IN_CLOG10L, +BUILT_IN_CONJ, +BUILT_IN_CONJF, +BUILT_IN_CONJL, +BUILT_IN_CPOW, +BUILT_IN_CPOWF, +BUILT_IN_CPOWL, +BUILT_IN_CPROJ, +BUILT_IN_CPROJF, +BUILT_IN_CPROJL, +BUILT_IN_CREAL, +BUILT_IN_CREALF, +BUILT_IN_CREALL, +BUILT_IN_CSIN, +BUILT_IN_CSINF, +BUILT_IN_CSINH, +BUILT_IN_CSINHF, +BUILT_IN_CSINHL, +BUILT_IN_CSINL, +BUILT_IN_CSQRT, +BUILT_IN_CSQRTF, +BUILT_IN_CSQRTL, +BUILT_IN_CTAN, +BUILT_IN_CTANF, +BUILT_IN_CTANH, +BUILT_IN_CTANHF, +BUILT_IN_CTANHL, +BUILT_IN_CTANL, + + + + +BUILT_IN_BCMP, +BUILT_IN_BCOPY, +BUILT_IN_BZERO, +BUILT_IN_INDEX, +BUILT_IN_MEMCMP, +BUILT_IN_MEMCPY, +BUILT_IN_MEMMOVE, +BUILT_IN_MEMPCPY, +BUILT_IN_MEMSET, +BUILT_IN_RINDEX, +BUILT_IN_STPCPY, +BUILT_IN_STPNCPY, +BUILT_IN_STRCASECMP, +BUILT_IN_STRCAT, +BUILT_IN_STRCHR, +BUILT_IN_STRCMP, +BUILT_IN_STRCPY, +BUILT_IN_STRCSPN, +BUILT_IN_STRDUP, +BUILT_IN_STRNDUP, +BUILT_IN_STRLEN, +BUILT_IN_STRNCASECMP, +BUILT_IN_STRNCAT, +BUILT_IN_STRNCMP, +BUILT_IN_STRNCPY, +BUILT_IN_STRPBRK, +BUILT_IN_STRRCHR, +BUILT_IN_STRSPN, +BUILT_IN_STRSTR, + + +BUILT_IN_FPRINTF, +BUILT_IN_FPRINTF_UNLOCKED, +BUILT_IN_PUTC, +BUILT_IN_PUTC_UNLOCKED, +BUILT_IN_FPUTC, +BUILT_IN_FPUTC_UNLOCKED, +BUILT_IN_FPUTS, +BUILT_IN_FPUTS_UNLOCKED, +BUILT_IN_FSCANF, +BUILT_IN_FWRITE, +BUILT_IN_FWRITE_UNLOCKED, +BUILT_IN_PRINTF, +BUILT_IN_PRINTF_UNLOCKED, +BUILT_IN_PUTCHAR, +BUILT_IN_PUTCHAR_UNLOCKED, +BUILT_IN_PUTS, +BUILT_IN_PUTS_UNLOCKED, +BUILT_IN_SCANF, +BUILT_IN_SNPRINTF, +BUILT_IN_SPRINTF, +BUILT_IN_SSCANF, +BUILT_IN_VFPRINTF, +BUILT_IN_VFSCANF, +BUILT_IN_VPRINTF, +BUILT_IN_VSCANF, +BUILT_IN_VSNPRINTF, +BUILT_IN_VSPRINTF, +BUILT_IN_VSSCANF, + + +BUILT_IN_ISALNUM, +BUILT_IN_ISALPHA, +BUILT_IN_ISASCII, +BUILT_IN_ISBLANK, +BUILT_IN_ISCNTRL, +BUILT_IN_ISDIGIT, +BUILT_IN_ISGRAPH, +BUILT_IN_ISLOWER, +BUILT_IN_ISPRINT, +BUILT_IN_ISPUNCT, +BUILT_IN_ISSPACE, +BUILT_IN_ISUPPER, +BUILT_IN_ISXDIGIT, +BUILT_IN_TOASCII, +BUILT_IN_TOLOWER, +BUILT_IN_TOUPPER, + + +BUILT_IN_ISWALNUM, +BUILT_IN_ISWALPHA, +BUILT_IN_ISWBLANK, +BUILT_IN_ISWCNTRL, +BUILT_IN_ISWDIGIT, +BUILT_IN_ISWGRAPH, +BUILT_IN_ISWLOWER, +BUILT_IN_ISWPRINT, +BUILT_IN_ISWPUNCT, +BUILT_IN_ISWSPACE, +BUILT_IN_ISWUPPER, +BUILT_IN_ISWXDIGIT, +BUILT_IN_TOWLOWER, +BUILT_IN_TOWUPPER, + + +BUILT_IN_ABORT, +BUILT_IN_ABS, +BUILT_IN_AGGREGATE_INCOMING_ADDRESS, +BUILT_IN_ALLOCA, +BUILT_IN_APPLY, +BUILT_IN_APPLY_ARGS, +BUILT_IN_ARGS_INFO, +BUILT_IN_CALLOC, +BUILT_IN_CLASSIFY_TYPE, +BUILT_IN_CLZ, +BUILT_IN_CLZIMAX, +BUILT_IN_CLZL, +BUILT_IN_CLZLL, +BUILT_IN_CONSTANT_P, +BUILT_IN_CTZ, +BUILT_IN_CTZIMAX, +BUILT_IN_CTZL, +BUILT_IN_CTZLL, +BUILT_IN_DCGETTEXT, +BUILT_IN_DGETTEXT, +BUILT_IN_DWARF_CFA, +BUILT_IN_DWARF_SP_COLUMN, +BUILT_IN_EH_RETURN, +BUILT_IN_EH_RETURN_DATA_REGNO, +BUILT_IN_EXECL, +BUILT_IN_EXECLP, +BUILT_IN_EXECLE, +BUILT_IN_EXECV, +BUILT_IN_EXECVP, +BUILT_IN_EXECVE, +BUILT_IN_EXIT, +BUILT_IN_EXPECT, +BUILT_IN_EXTEND_POINTER, +BUILT_IN_EXTRACT_RETURN_ADDR, +BUILT_IN_FFS, +BUILT_IN_FFSIMAX, +BUILT_IN_FFSL, +BUILT_IN_FFSLL, +BUILT_IN_FORK, +BUILT_IN_FRAME_ADDRESS, +BUILT_IN_FROB_RETURN_ADDR, +BUILT_IN_GETTEXT, +BUILT_IN_IMAXABS, +BUILT_IN_INIT_DWARF_REG_SIZES, +BUILT_IN_FINITE, +BUILT_IN_FINITEF, +BUILT_IN_FINITEL, +BUILT_IN_FINITED32, +BUILT_IN_FINITED64, +BUILT_IN_FINITED128, +BUILT_IN_ISINF, +BUILT_IN_ISINFF, +BUILT_IN_ISINFL, +BUILT_IN_ISINFD32, +BUILT_IN_ISINFD64, +BUILT_IN_ISINFD128, +BUILT_IN_ISNAN, +BUILT_IN_ISNANF, +BUILT_IN_ISNANL, +BUILT_IN_ISNAND32, +BUILT_IN_ISNAND64, +BUILT_IN_ISNAND128, +BUILT_IN_ISGREATER, +BUILT_IN_ISGREATEREQUAL, +BUILT_IN_ISLESS, +BUILT_IN_ISLESSEQUAL, +BUILT_IN_ISLESSGREATER, +BUILT_IN_ISUNORDERED, +BUILT_IN_LABS, +BUILT_IN_LLABS, +BUILT_IN_LONGJMP, +BUILT_IN_MALLOC, +BUILT_IN_NEXT_ARG, +BUILT_IN_PARITY, +BUILT_IN_PARITYIMAX, +BUILT_IN_PARITYL, +BUILT_IN_PARITYLL, +BUILT_IN_POPCOUNT, +BUILT_IN_POPCOUNTIMAX, +BUILT_IN_POPCOUNTL, +BUILT_IN_POPCOUNTLL, +BUILT_IN_PREFETCH, +BUILT_IN_RETURN, +BUILT_IN_RETURN_ADDRESS, +BUILT_IN_SAVEREGS, +BUILT_IN_SETJMP, +BUILT_IN_STDARG_START, +BUILT_IN_STRFMON, +BUILT_IN_STRFTIME, +BUILT_IN_TRAP, +BUILT_IN_UNWIND_INIT, +BUILT_IN_UPDATE_SETJMP_BUF, +BUILT_IN_VA_COPY, +BUILT_IN_VA_END, +BUILT_IN_VA_START, +BUILT_IN__EXIT, +BUILT_IN__EXIT2, + + +BUILT_IN_INIT_TRAMPOLINE, +BUILT_IN_ADJUST_TRAMPOLINE, +BUILT_IN_NONLOCAL_GOTO, + + +BUILT_IN_SETJMP_SETUP, +BUILT_IN_SETJMP_DISPATCHER, +BUILT_IN_SETJMP_RECEIVER, + + +BUILT_IN_STACK_SAVE, +BUILT_IN_STACK_RESTORE, + + +BUILT_IN_OBJECT_SIZE, +BUILT_IN_MEMCPY_CHK, +BUILT_IN_MEMMOVE_CHK, +BUILT_IN_MEMPCPY_CHK, +BUILT_IN_MEMSET_CHK, +BUILT_IN_STPCPY_CHK, +BUILT_IN_STRCAT_CHK, +BUILT_IN_STRCPY_CHK, +BUILT_IN_STRNCAT_CHK, +BUILT_IN_STRNCPY_CHK, +BUILT_IN_SNPRINTF_CHK, +BUILT_IN_SPRINTF_CHK, +BUILT_IN_VSNPRINTF_CHK, +BUILT_IN_VSPRINTF_CHK, +BUILT_IN_FPRINTF_CHK, +BUILT_IN_PRINTF_CHK, +BUILT_IN_VFPRINTF_CHK, +BUILT_IN_VPRINTF_CHK, + + +BUILT_IN_PROFILE_FUNC_ENTER, +BUILT_IN_PROFILE_FUNC_EXIT, + + +# 1 "../../GCC/gcc/sync-builtins.def" 1 +# 31 "../../GCC/gcc/sync-builtins.def" +BUILT_IN_FETCH_AND_ADD_N, + +BUILT_IN_FETCH_AND_ADD_1, + +BUILT_IN_FETCH_AND_ADD_2, + +BUILT_IN_FETCH_AND_ADD_4, + +BUILT_IN_FETCH_AND_ADD_8, + +BUILT_IN_FETCH_AND_ADD_16, + + +BUILT_IN_FETCH_AND_SUB_N, + +BUILT_IN_FETCH_AND_SUB_1, + +BUILT_IN_FETCH_AND_SUB_2, + +BUILT_IN_FETCH_AND_SUB_4, + +BUILT_IN_FETCH_AND_SUB_8, + +BUILT_IN_FETCH_AND_SUB_16, + + +BUILT_IN_FETCH_AND_OR_N, + +BUILT_IN_FETCH_AND_OR_1, + +BUILT_IN_FETCH_AND_OR_2, + +BUILT_IN_FETCH_AND_OR_4, + +BUILT_IN_FETCH_AND_OR_8, + +BUILT_IN_FETCH_AND_OR_16, + + +BUILT_IN_FETCH_AND_AND_N, + +BUILT_IN_FETCH_AND_AND_1, + +BUILT_IN_FETCH_AND_AND_2, + +BUILT_IN_FETCH_AND_AND_4, + +BUILT_IN_FETCH_AND_AND_8, + +BUILT_IN_FETCH_AND_AND_16, + + +BUILT_IN_FETCH_AND_XOR_N, + +BUILT_IN_FETCH_AND_XOR_1, + +BUILT_IN_FETCH_AND_XOR_2, + +BUILT_IN_FETCH_AND_XOR_4, + +BUILT_IN_FETCH_AND_XOR_8, + +BUILT_IN_FETCH_AND_XOR_16, + + +BUILT_IN_FETCH_AND_NAND_N, + +BUILT_IN_FETCH_AND_NAND_1, + +BUILT_IN_FETCH_AND_NAND_2, + +BUILT_IN_FETCH_AND_NAND_4, + +BUILT_IN_FETCH_AND_NAND_8, + +BUILT_IN_FETCH_AND_NAND_16, + + +BUILT_IN_ADD_AND_FETCH_N, + +BUILT_IN_ADD_AND_FETCH_1, + +BUILT_IN_ADD_AND_FETCH_2, + +BUILT_IN_ADD_AND_FETCH_4, + +BUILT_IN_ADD_AND_FETCH_8, + +BUILT_IN_ADD_AND_FETCH_16, + + +BUILT_IN_SUB_AND_FETCH_N, + +BUILT_IN_SUB_AND_FETCH_1, + +BUILT_IN_SUB_AND_FETCH_2, + +BUILT_IN_SUB_AND_FETCH_4, + +BUILT_IN_SUB_AND_FETCH_8, + +BUILT_IN_SUB_AND_FETCH_16, + + +BUILT_IN_OR_AND_FETCH_N, + +BUILT_IN_OR_AND_FETCH_1, + +BUILT_IN_OR_AND_FETCH_2, + +BUILT_IN_OR_AND_FETCH_4, + +BUILT_IN_OR_AND_FETCH_8, + +BUILT_IN_OR_AND_FETCH_16, + + +BUILT_IN_AND_AND_FETCH_N, + +BUILT_IN_AND_AND_FETCH_1, + +BUILT_IN_AND_AND_FETCH_2, + +BUILT_IN_AND_AND_FETCH_4, + +BUILT_IN_AND_AND_FETCH_8, + +BUILT_IN_AND_AND_FETCH_16, + + +BUILT_IN_XOR_AND_FETCH_N, + +BUILT_IN_XOR_AND_FETCH_1, + +BUILT_IN_XOR_AND_FETCH_2, + +BUILT_IN_XOR_AND_FETCH_4, + +BUILT_IN_XOR_AND_FETCH_8, + +BUILT_IN_XOR_AND_FETCH_16, + + +BUILT_IN_NAND_AND_FETCH_N, + +BUILT_IN_NAND_AND_FETCH_1, + +BUILT_IN_NAND_AND_FETCH_2, + +BUILT_IN_NAND_AND_FETCH_4, + +BUILT_IN_NAND_AND_FETCH_8, + +BUILT_IN_NAND_AND_FETCH_16, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_N, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_1, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_2, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_4, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_8, + + +BUILT_IN_BOOL_COMPARE_AND_SWAP_16, + + + +BUILT_IN_VAL_COMPARE_AND_SWAP_N, + + +BUILT_IN_VAL_COMPARE_AND_SWAP_1, + + +BUILT_IN_VAL_COMPARE_AND_SWAP_2, + + +BUILT_IN_VAL_COMPARE_AND_SWAP_4, + + +BUILT_IN_VAL_COMPARE_AND_SWAP_8, + + +BUILT_IN_VAL_COMPARE_AND_SWAP_16, + + + +BUILT_IN_LOCK_TEST_AND_SET_N, + +BUILT_IN_LOCK_TEST_AND_SET_1, + +BUILT_IN_LOCK_TEST_AND_SET_2, + +BUILT_IN_LOCK_TEST_AND_SET_4, + +BUILT_IN_LOCK_TEST_AND_SET_8, + +BUILT_IN_LOCK_TEST_AND_SET_16, + + +BUILT_IN_LOCK_RELEASE_N, + +BUILT_IN_LOCK_RELEASE_1, + +BUILT_IN_LOCK_RELEASE_2, + +BUILT_IN_LOCK_RELEASE_4, + +BUILT_IN_LOCK_RELEASE_8, + +BUILT_IN_LOCK_RELEASE_16, + + +BUILT_IN_SYNCHRONIZE, +# 727 "../../GCC/gcc/builtins.def" 2 + + +# 1 "../../GCC/gcc/omp-builtins.def" 1 +# 27 "../../GCC/gcc/omp-builtins.def" +BUILT_IN_OMP_GET_THREAD_NUM, + +BUILT_IN_OMP_GET_NUM_THREADS, + + +BUILT_IN_GOMP_ATOMIC_START, + +BUILT_IN_GOMP_ATOMIC_END, + +BUILT_IN_GOMP_BARRIER, + +BUILT_IN_GOMP_CRITICAL_START, + +BUILT_IN_GOMP_CRITICAL_END, + +BUILT_IN_GOMP_CRITICAL_NAME_START, + + +BUILT_IN_GOMP_CRITICAL_NAME_END, + + + + + +BUILT_IN_GOMP_LOOP_STATIC_START, + + + +BUILT_IN_GOMP_LOOP_DYNAMIC_START, + + + +BUILT_IN_GOMP_LOOP_GUIDED_START, + + + +BUILT_IN_GOMP_LOOP_RUNTIME_START, + + + +BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START, + + + +BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START, + + + +BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START, + + + +BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START, + + + +BUILT_IN_GOMP_LOOP_STATIC_NEXT, + +BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT, + +BUILT_IN_GOMP_LOOP_GUIDED_NEXT, + +BUILT_IN_GOMP_LOOP_RUNTIME_NEXT, + +BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT, + + +BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT, + + +BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT, + + +BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT, + + + + + +BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START, + + + +BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START, + + + +BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START, + + + +BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START, + + + +BUILT_IN_GOMP_LOOP_END, + +BUILT_IN_GOMP_LOOP_END_NOWAIT, + +BUILT_IN_GOMP_ORDERED_START, + +BUILT_IN_GOMP_ORDERED_END, + +BUILT_IN_GOMP_PARALLEL_START, + +BUILT_IN_GOMP_PARALLEL_END, + +BUILT_IN_GOMP_SECTIONS_START, + +BUILT_IN_GOMP_SECTIONS_NEXT, + +BUILT_IN_GOMP_PARALLEL_SECTIONS_START, + + +BUILT_IN_GOMP_SECTIONS_END, + +BUILT_IN_GOMP_SECTIONS_END_NOWAIT, + + +BUILT_IN_GOMP_SINGLE_START, + +BUILT_IN_GOMP_SINGLE_COPY_START, + +BUILT_IN_GOMP_SINGLE_COPY_END, +# 729 "../../GCC/gcc/builtins.def" 2 +# 218 "../../GCC/gcc/tree.h" 2 + + + + BUILT_IN_COMPLEX_MUL_MIN, + BUILT_IN_COMPLEX_MUL_MAX + = BUILT_IN_COMPLEX_MUL_MIN + + MAX_MODE_COMPLEX_FLOAT + - MIN_MODE_COMPLEX_FLOAT, + + BUILT_IN_COMPLEX_DIV_MIN, + BUILT_IN_COMPLEX_DIV_MAX + = BUILT_IN_COMPLEX_DIV_MIN + + MAX_MODE_COMPLEX_FLOAT + - MIN_MODE_COMPLEX_FLOAT, + + + END_BUILTINS +}; + + + +extern const char * built_in_names[(int) END_BUILTINS]; +# 263 "../../GCC/gcc/tree.h" +extern tree built_in_decls[(int) END_BUILTINS]; +extern tree implicit_built_in_decls[(int) END_BUILTINS]; + + + + +extern unsigned const char omp_clause_num_ops[]; +extern const char * const omp_clause_code_name[]; + + + +enum omp_clause_code +{ + + + OMP_CLAUSE_ERROR = 0, + + + OMP_CLAUSE_PRIVATE, + + + OMP_CLAUSE_SHARED, + + + OMP_CLAUSE_FIRSTPRIVATE, + + + OMP_CLAUSE_LASTPRIVATE, +# 299 "../../GCC/gcc/tree.h" + OMP_CLAUSE_REDUCTION, + + + OMP_CLAUSE_COPYIN, + + + OMP_CLAUSE_COPYPRIVATE, + + + OMP_CLAUSE_IF, + + + OMP_CLAUSE_NUM_THREADS, + + + OMP_CLAUSE_SCHEDULE, + + + OMP_CLAUSE_NOWAIT, + + + OMP_CLAUSE_ORDERED, + + + OMP_CLAUSE_DEFAULT +}; +# 347 "../../GCC/gcc/tree.h" +union tree_ann_d; + +struct tree_common +{ + tree chain; + tree type; + union tree_ann_d *ann; + + __extension__ enum tree_code code : 8; + + unsigned side_effects_flag : 1; + unsigned constant_flag : 1; + unsigned addressable_flag : 1; + unsigned volatile_flag : 1; + unsigned readonly_flag : 1; + unsigned unsigned_flag : 1; + unsigned asm_written_flag: 1; + unsigned nowarning_flag : 1; + + unsigned used_flag : 1; + unsigned nothrow_flag : 1; + unsigned static_flag : 1; + unsigned public_flag : 1; + unsigned private_flag : 1; + unsigned protected_flag : 1; + unsigned deprecated_flag : 1; + unsigned invariant_flag : 1; + + unsigned lang_flag_0 : 1; + unsigned lang_flag_1 : 1; + unsigned lang_flag_2 : 1; + unsigned lang_flag_3 : 1; + unsigned lang_flag_4 : 1; + unsigned lang_flag_5 : 1; + unsigned lang_flag_6 : 1; + unsigned visited : 1; +}; +# 546 "../../GCC/gcc/tree.h" +enum tree_node_structure_enum { +# 1 "../../GCC/gcc/treestruct.def" 1 +# 30 "../../GCC/gcc/treestruct.def" +TS_COMMON, +TS_INT_CST, +TS_REAL_CST, +TS_VECTOR, +TS_STRING, +TS_COMPLEX, +TS_IDENTIFIER, +TS_DECL_MINIMAL, +TS_DECL_COMMON, +TS_DECL_WRTL, +TS_DECL_NON_COMMON, +TS_DECL_WITH_VIS, +TS_FIELD_DECL, +TS_VAR_DECL, +TS_PARM_DECL, +TS_LABEL_DECL, +TS_RESULT_DECL, +TS_CONST_DECL, +TS_TYPE_DECL, +TS_FUNCTION_DECL, +TS_TYPE, +TS_LIST, +TS_VEC, +TS_EXP, +TS_SSA_NAME, +TS_PHI_NODE, +TS_BLOCK, +TS_BINFO, +TS_STATEMENT_LIST, +TS_VALUE_HANDLE, +TS_CONSTRUCTOR, +TS_MEMORY_TAG, +TS_STRUCT_FIELD_TAG, +TS_OMP_CLAUSE, +# 548 "../../GCC/gcc/tree.h" 2 + LAST_TS_ENUM +}; +# 776 "../../GCC/gcc/tree.h" +extern void tree_contains_struct_check_failed (const tree, + const enum tree_node_structure_enum, + const char *, int, const char *) + __attribute__ ((__noreturn__)); + +extern void tree_check_failed (const tree, const char *, int, const char *, + ...) __attribute__ ((__noreturn__)); +extern void tree_not_check_failed (const tree, const char *, int, const char *, + ...) __attribute__ ((__noreturn__)); +extern void tree_class_check_failed (const tree, const enum tree_code_class, + const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void tree_range_check_failed (const tree, const char *, int, + const char *, enum tree_code, + enum tree_code); +extern void tree_not_class_check_failed (const tree, + const enum tree_code_class, + const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void tree_vec_elt_check_failed (int, int, const char *, + int, const char *) + __attribute__ ((__noreturn__)); +extern void phi_node_elt_check_failed (int, int, const char *, + int, const char *) + __attribute__ ((__noreturn__)); +extern void tree_operand_check_failed (int, enum tree_code, + const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void omp_clause_check_failed (const tree, const char *, int, + const char *, enum omp_clause_code) + __attribute__ ((__noreturn__)); +extern void omp_clause_operand_check_failed (int, tree, const char *, + int, const char *) + __attribute__ ((__noreturn__)); +extern void omp_clause_range_check_failed (const tree, const char *, int, + const char *, enum omp_clause_code, + enum omp_clause_code) + __attribute__ ((__noreturn__)); +# 845 "../../GCC/gcc/tree.h" +# 1 "./tree-check.h" 1 +# 846 "../../GCC/gcc/tree.h" 2 +# 1260 "../../GCC/gcc/tree.h" +struct tree_int_cst +{ + struct tree_common common; + double_int int_cst; +}; + + + + +struct real_value; + + + + +struct tree_real_cst +{ + struct tree_common common; + struct real_value * real_cst_ptr; +}; + + + + + + +struct tree_string +{ + struct tree_common common; + int length; + char str[1]; +}; + + + + + +struct tree_complex +{ + struct tree_common common; + tree real; + tree imag; +}; + + + + +struct tree_vector +{ + struct tree_common common; + tree elements; +}; + +# 1 "../../GCC/gcc/../libcpp/include/symtab.h" 1 +# 21 "../../GCC/gcc/../libcpp/include/symtab.h" +# 1 "../../GCC/gcc/../include/obstack.h" 1 +# 157 "../../GCC/gcc/../include/obstack.h" +struct _obstack_chunk +{ + char *limit; + struct _obstack_chunk *prev; + char contents[4]; +}; + +struct obstack +{ + long chunk_size; + struct _obstack_chunk *chunk; + char *object_base; + char *next_free; + char *chunk_limit; + int temp; + int alignment_mask; + + + + struct _obstack_chunk *(*chunkfun) (void *, long); + void (*freefun) (void *, struct _obstack_chunk *); + void *extra_arg; + unsigned use_extra_arg:1; + unsigned maybe_empty_object:1; + + + + unsigned alloc_failed:1; + + +}; + + + +extern void _obstack_newchunk (struct obstack *, int); +extern void _obstack_free (struct obstack *, void *); +extern int _obstack_begin (struct obstack *, int, int, + void *(*) (long), void (*) (void *)); +extern int _obstack_begin_1 (struct obstack *, int, int, + void *(*) (void *, long), + void (*) (void *, void *), void *); +extern int _obstack_memory_used (struct obstack *); + + + + +void obstack_init (struct obstack *obstack); + +void * obstack_alloc (struct obstack *obstack, int size); + +void * obstack_copy (struct obstack *obstack, void *address, int size); +void * obstack_copy0 (struct obstack *obstack, void *address, int size); + +void obstack_free (struct obstack *obstack, void *block); + +void obstack_blank (struct obstack *obstack, int size); + +void obstack_grow (struct obstack *obstack, void *data, int size); +void obstack_grow0 (struct obstack *obstack, void *data, int size); + +void obstack_1grow (struct obstack *obstack, int data_char); +void obstack_ptr_grow (struct obstack *obstack, void *data); +void obstack_int_grow (struct obstack *obstack, int data); + +void * obstack_finish (struct obstack *obstack); + +int obstack_object_size (struct obstack *obstack); + +int obstack_room (struct obstack *obstack); +void obstack_make_room (struct obstack *obstack, int size); +void obstack_1grow_fast (struct obstack *obstack, int data_char); +void obstack_ptr_grow_fast (struct obstack *obstack, void *data); +void obstack_int_grow_fast (struct obstack *obstack, int data); +void obstack_blank_fast (struct obstack *obstack, int size); + +void * obstack_base (struct obstack *obstack); +void * obstack_next_free (struct obstack *obstack); +int obstack_alignment_mask (struct obstack *obstack); +int obstack_chunk_size (struct obstack *obstack); +int obstack_memory_used (struct obstack *obstack); + + + + +extern void (*obstack_alloc_failed_handler) (void); + + +extern int obstack_exit_failure; +# 22 "../../GCC/gcc/../libcpp/include/symtab.h" 2 + + + + +typedef struct ht_identifier ht_identifier; +struct ht_identifier +{ + const unsigned char *str; + unsigned int len; + unsigned int hash_value; +}; + + + + +typedef struct ht hash_table; +typedef struct ht_identifier *hashnode; + +enum ht_lookup_option {HT_NO_INSERT = 0, HT_ALLOC, HT_ALLOCED}; + + +struct ht +{ + + struct obstack stack; + + hashnode *entries; + + hashnode (*alloc_node) (hash_table *); + + + void * (*alloc_subobject) (size_t); + + unsigned int nslots; + unsigned int nelements; + + + struct cpp_reader *pfile; + + + unsigned int searches; + unsigned int collisions; + + + unsigned char entries_owned; +}; + + +extern hash_table *ht_create (unsigned int order); + + +extern void ht_destroy (hash_table *); + +extern hashnode ht_lookup (hash_table *, const unsigned char *, + size_t, enum ht_lookup_option); +extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *, + size_t, unsigned int, + enum ht_lookup_option); + + + + + + +typedef int (*ht_cb) (struct cpp_reader *, hashnode, const void *); +extern void ht_forall (hash_table *, ht_cb, const void *); + + +extern void ht_load (hash_table *ht, hashnode *entries, + unsigned int nslots, unsigned int nelements, unsigned char own); + + +extern void ht_dump_statistics (hash_table *); +# 1313 "../../GCC/gcc/tree.h" 2 +# 1330 "../../GCC/gcc/tree.h" +struct tree_identifier +{ + struct tree_common common; + struct ht_identifier id; +}; + + + + + +struct tree_list +{ + struct tree_common common; + tree purpose; + tree value; +}; +# 1354 "../../GCC/gcc/tree.h" +struct tree_vec +{ + struct tree_common common; + int length; + tree a[1]; +}; +# 1397 "../../GCC/gcc/tree.h" +typedef struct constructor_elt_d +{ + tree index; + tree value; +} constructor_elt; + +typedef struct VEC_constructor_elt_base { unsigned num; unsigned alloc; constructor_elt vec[1]; } VEC_constructor_elt_base; typedef struct VEC_constructor_elt_none { VEC_constructor_elt_base base; } VEC_constructor_elt_none; static __inline__ unsigned VEC_constructor_elt_base_length (const VEC_constructor_elt_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ constructor_elt *VEC_constructor_elt_base_last (VEC_constructor_elt_base *vec_ ) { (void)(vec_ && vec_->num); return &vec_->vec[vec_->num - 1]; } static __inline__ constructor_elt *VEC_constructor_elt_base_index (VEC_constructor_elt_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return &vec_->vec[ix_]; } static __inline__ int VEC_constructor_elt_base_iterate (VEC_constructor_elt_base *vec_, unsigned ix_, constructor_elt **ptr) { if (vec_ && ix_ < vec_->num) { *ptr = &vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_constructor_elt_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_constructor_elt_base, vec) + alloc_ * sizeof(constructor_elt); } static __inline__ void VEC_constructor_elt_base_embedded_init (VEC_constructor_elt_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_constructor_elt_base_space (VEC_constructor_elt_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ constructor_elt *VEC_constructor_elt_base_quick_push (VEC_constructor_elt_base *vec_, const constructor_elt *obj_ ) { constructor_elt *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; if (obj_) *slot_ = *obj_; return slot_; } static __inline__ void VEC_constructor_elt_base_pop (VEC_constructor_elt_base *vec_ ) { (void)(vec_->num); --vec_->num; } static __inline__ void VEC_constructor_elt_base_truncate (VEC_constructor_elt_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ constructor_elt *VEC_constructor_elt_base_replace (VEC_constructor_elt_base *vec_, unsigned ix_, const constructor_elt *obj_ ) { constructor_elt *slot_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; if (obj_) *slot_ = *obj_; return slot_; } static __inline__ constructor_elt *VEC_constructor_elt_base_quick_insert (VEC_constructor_elt_base *vec_, unsigned ix_, const constructor_elt *obj_ ) { constructor_elt *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (constructor_elt)); if (obj_) *slot_ = *obj_; return slot_; } static __inline__ void VEC_constructor_elt_base_ordered_remove (VEC_constructor_elt_base *vec_, unsigned ix_ ) { constructor_elt *slot_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (constructor_elt)); } static __inline__ void VEC_constructor_elt_base_unordered_remove (VEC_constructor_elt_base *vec_, unsigned ix_ ) { (void)(ix_ < vec_->num); vec_->vec[ix_] = vec_->vec[--vec_->num]; } static __inline__ void VEC_constructor_elt_base_block_remove (VEC_constructor_elt_base *vec_, unsigned ix_, unsigned len_ ) { constructor_elt *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (constructor_elt)); } static __inline__ constructor_elt *VEC_constructor_elt_base_address (VEC_constructor_elt_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_constructor_elt_base_lower_bound (VEC_constructor_elt_base *vec_, const constructor_elt *obj_, unsigned char (*lessthan_)(const constructor_elt *, const constructor_elt *) ) { unsigned int len_ = VEC_constructor_elt_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { constructor_elt *middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_constructor_elt_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_constructor_elt_gc { VEC_constructor_elt_base base; } VEC_constructor_elt_gc; static __inline__ VEC_constructor_elt_gc *VEC_constructor_elt_gc_alloc (int alloc_ ) { return (VEC_constructor_elt_gc *) vec_gc_o_reserve_exact (((void *)0), alloc_, __builtin_offsetof (VEC_constructor_elt_gc, base.vec), sizeof (constructor_elt) ); } static __inline__ VEC_constructor_elt_gc *VEC_constructor_elt_gc_copy (VEC_constructor_elt_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_constructor_elt_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_constructor_elt_gc *)(vec_gc_o_reserve_exact (((void *)0), len_, __builtin_offsetof (VEC_constructor_elt_gc, base.vec), sizeof (constructor_elt) )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (constructor_elt) * len_); } return new_vec_; } static __inline__ void VEC_constructor_elt_gc_free (VEC_constructor_elt_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ int VEC_constructor_elt_gc_reserve (VEC_constructor_elt_gc **vec_, int alloc_ ) { int extend = !VEC_constructor_elt_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_constructor_elt_gc *) vec_gc_o_reserve (*vec_, alloc_, __builtin_offsetof (VEC_constructor_elt_gc, base.vec), sizeof (constructor_elt) ); return extend; } static __inline__ int VEC_constructor_elt_gc_reserve_exact (VEC_constructor_elt_gc **vec_, int alloc_ ) { int extend = !VEC_constructor_elt_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_constructor_elt_gc *) vec_gc_o_reserve_exact (*vec_, alloc_, __builtin_offsetof (VEC_constructor_elt_gc, base.vec), sizeof (constructor_elt) ); return extend; } static __inline__ void VEC_constructor_elt_gc_safe_grow (VEC_constructor_elt_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_constructor_elt_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_constructor_elt_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ constructor_elt *VEC_constructor_elt_gc_safe_push (VEC_constructor_elt_gc **vec_, const constructor_elt *obj_ ) { VEC_constructor_elt_gc_reserve (vec_, 1 ); return VEC_constructor_elt_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ constructor_elt *VEC_constructor_elt_gc_safe_insert (VEC_constructor_elt_gc **vec_, unsigned ix_, const constructor_elt *obj_ ) { VEC_constructor_elt_gc_reserve (vec_, 1 ); return VEC_constructor_elt_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; + +struct tree_constructor +{ + struct tree_common common; + VEC_constructor_elt_gc *elts; +}; +# 1633 "../../GCC/gcc/tree.h" +enum omp_clause_schedule_kind +{ + OMP_CLAUSE_SCHEDULE_STATIC, + OMP_CLAUSE_SCHEDULE_DYNAMIC, + OMP_CLAUSE_SCHEDULE_GUIDED, + OMP_CLAUSE_SCHEDULE_RUNTIME +}; + + + + +enum omp_clause_default_kind +{ + OMP_CLAUSE_DEFAULT_UNSPECIFIED, + OMP_CLAUSE_DEFAULT_SHARED, + OMP_CLAUSE_DEFAULT_NONE, + OMP_CLAUSE_DEFAULT_PRIVATE +}; + + + + +struct tree_exp +{ + struct tree_common common; + source_locus locus; + int complexity; + tree block; + tree + + operands[1]; +}; +# 1702 "../../GCC/gcc/tree.h" +struct ptr_info_def; + + + + + + +typedef struct ssa_use_operand_d +{ + struct ssa_use_operand_d* prev; + struct ssa_use_operand_d* next; + tree stmt; + tree * use; +} ssa_use_operand_t; + + + + +struct tree_ssa_name +{ + struct tree_common common; + + + tree var; + + + unsigned int version; + + + struct ptr_info_def *ptr_info; + + + + + + + tree value_handle; + + + struct ssa_use_operand_d imm_uses; +}; +# 1767 "../../GCC/gcc/tree.h" +struct phi_arg_d +{ + + + struct ssa_use_operand_d imm_use; + tree def; +}; + +struct tree_phi_node +{ + struct tree_common common; + tree result; + int num_args; + int capacity; + + + struct basic_block_def *bb; + + + + struct phi_arg_d a[1]; +}; +# 1802 "../../GCC/gcc/tree.h" +struct tree_omp_clause +{ + struct tree_common common; + enum omp_clause_code code; + union omp_clause_subcode { + enum omp_clause_default_kind default_kind; + enum omp_clause_schedule_kind schedule_kind; + enum tree_code reduction_code; + } subcode; + tree ops[1]; +}; + + +struct varray_head_tag; +# 1868 "../../GCC/gcc/tree.h" +struct tree_block +{ + struct tree_common common; + + unsigned handler_block_flag : 1; + unsigned abstract_flag : 1; + unsigned block_num : 30; + + tree vars; + tree subblocks; + tree supercontext; + tree abstract_origin; + tree fragment_origin; + tree fragment_chain; + location_t locus; +}; +# 2079 "../../GCC/gcc/tree.h" +struct die_struct; + +struct tree_type +{ + struct tree_common common; + tree values; + tree size; + tree size_unit; + tree attributes; + unsigned int uid; + + unsigned int precision : 9; + __extension__ enum machine_mode mode : 7; + + unsigned string_flag : 1; + unsigned no_force_blk_flag : 1; + unsigned needs_constructing_flag : 1; + unsigned transparent_union_flag : 1; + unsigned packed_flag : 1; + unsigned restrict_flag : 1; + unsigned contains_placeholder_bits : 2; + + unsigned lang_flag_0 : 1; + unsigned lang_flag_1 : 1; + unsigned lang_flag_2 : 1; + unsigned lang_flag_3 : 1; + unsigned lang_flag_4 : 1; + unsigned lang_flag_5 : 1; + unsigned lang_flag_6 : 1; + unsigned user_align : 1; + + unsigned int align; + tree pointer_to; + tree reference_to; + union tree_type_symtab { + int address; + char * pointer; + struct die_struct * die; + } symtab; + + tree name; + tree minval; + tree maxval; + tree next_variant; + tree main_variant; + tree binfo; + tree context; + long alias_set; + + struct lang_type *lang_specific; +}; +# 2234 "../../GCC/gcc/tree.h" +struct tree_binfo +{ + struct tree_common common; + + tree offset; + tree vtable; + tree virtuals; + tree vptr_field; + VEC_tree_gc *base_accesses; + tree inheritance; + + tree vtt_subvtt; + tree vtt_vptr; + + VEC_tree_none base_binfos; +}; +# 2272 "../../GCC/gcc/tree.h" +enum symbol_visibility +{ + VISIBILITY_DEFAULT, + VISIBILITY_PROTECTED, + VISIBILITY_HIDDEN, + VISIBILITY_INTERNAL +}; + + +struct function; +# 2314 "../../GCC/gcc/tree.h" +struct tree_decl_minimal +{ + struct tree_common common; + location_t locus; + unsigned int uid; + tree name; + tree context; +}; +# 2340 "../../GCC/gcc/tree.h" +struct tree_memory_tag +{ + struct tree_decl_minimal common; + unsigned int is_global:1; + unsigned int is_used_alone:1; + unsigned int old_used_alone:1; +}; +# 2360 "../../GCC/gcc/tree.h" +struct tree_struct_field_tag +{ + struct tree_memory_tag common; + + + tree parent_var; + + + unsigned long offset; + + + unsigned long size; + +}; +# 2531 "../../GCC/gcc/tree.h" +struct tree_decl_common +{ + struct tree_decl_minimal common; + tree size; + + __extension__ enum machine_mode mode : 8; + + unsigned nonlocal_flag : 1; + unsigned virtual_flag : 1; + unsigned ignored_flag : 1; + unsigned abstract_flag : 1; + unsigned artificial_flag : 1; + unsigned user_align : 1; + unsigned preserve_flag: 1; + unsigned debug_expr_is_from : 1; + + unsigned lang_flag_0 : 1; + unsigned lang_flag_1 : 1; + unsigned lang_flag_2 : 1; + unsigned lang_flag_3 : 1; + unsigned lang_flag_4 : 1; + unsigned lang_flag_5 : 1; + unsigned lang_flag_6 : 1; + unsigned lang_flag_7 : 1; + + + + unsigned decl_flag_0 : 1; + + unsigned decl_flag_1 : 1; + + + + unsigned decl_flag_2 : 1; + + + unsigned decl_flag_3 : 1; + + + unsigned gimple_reg_flag : 1; + unsigned call_clobbered_flag : 1; + + union tree_decl_u1 { + + + enum built_in_function f; + + + long i; + + + struct tree_decl_u1_a { + unsigned int align : 24; + unsigned int off_align : 8; + } a; + } u1; + + tree size_unit; + tree initial; + tree attributes; + tree abstract_origin; + + long pointer_alias_set; + + struct lang_decl *lang_specific; +}; + +extern tree decl_value_expr_lookup (tree); +extern void decl_value_expr_insert (tree, tree); +# 2640 "../../GCC/gcc/tree.h" +struct tree_decl_with_rtl +{ + struct tree_decl_common common; + rtx rtl; +}; +# 2696 "../../GCC/gcc/tree.h" +struct tree_field_decl +{ + struct tree_decl_common common; + + tree offset; + tree bit_field_type; + tree qualifier; + tree bit_offset; + tree fcontext; + +}; +# 2718 "../../GCC/gcc/tree.h" +struct tree_label_decl +{ + struct tree_decl_with_rtl common; + + + + tree java_field_1; + tree java_field_2; + tree java_field_3; + unsigned int java_field_4; + +}; + +struct tree_result_decl +{ + struct tree_decl_with_rtl common; +}; + +struct tree_const_decl +{ + struct tree_decl_with_rtl common; +}; +# 2749 "../../GCC/gcc/tree.h" +struct tree_parm_decl +{ + struct tree_decl_with_rtl common; + rtx incoming_rtl; +}; +# 2793 "../../GCC/gcc/tree.h" +extern tree decl_restrict_base_lookup (tree); +extern void decl_restrict_base_insert (tree, tree); +# 2877 "../../GCC/gcc/tree.h" +struct tree_decl_with_vis +{ + struct tree_decl_with_rtl common; + tree assembler_name; + tree section_name; + + + unsigned defer_output:1; + unsigned hard_register:1; + unsigned thread_local:1; + unsigned common_flag:1; + unsigned in_text_section : 1; + unsigned gimple_formal_temp : 1; + unsigned dllimport_flag : 1; + unsigned based_on_restrict_p : 1; + + unsigned shadowed_for_var_p : 1; + + + unsigned in_system_header_flag : 1; + unsigned weak_flag:1; + unsigned seen_in_bind_expr : 1; + unsigned comdat_flag : 1; + __extension__ enum symbol_visibility visibility : 2; + unsigned visibility_specified : 1; + + unsigned one_only : 1; + unsigned init_priority_p:1; + + + __extension__ enum tls_model tls_model : 3; + +}; +# 2924 "../../GCC/gcc/tree.h" +extern tree decl_debug_expr_lookup (tree); +extern void decl_debug_expr_insert (tree, tree); +# 2936 "../../GCC/gcc/tree.h" +extern unsigned short decl_init_priority_lookup (tree); +extern void decl_init_priority_insert (tree, unsigned short); +# 2959 "../../GCC/gcc/tree.h" +struct tree_var_decl +{ + struct tree_decl_with_vis common; +}; +# 2979 "../../GCC/gcc/tree.h" +struct tree_decl_non_common + +{ + struct tree_decl_with_vis common; + + tree saved_tree; + + tree arguments; + + tree result; + + tree vindex; +}; +# 3084 "../../GCC/gcc/tree.h" +struct tree_function_decl +{ + struct tree_decl_non_common common; + + unsigned static_ctor_flag : 1; + unsigned static_dtor_flag : 1; + unsigned uninlinable : 1; + unsigned possibly_inlined : 1; + unsigned novops_flag : 1; + unsigned returns_twice_flag : 1; + unsigned malloc_flag : 1; + unsigned pure_flag : 1; + + unsigned declared_inline_flag : 1; + unsigned regdecl_flag : 1; + unsigned inline_flag : 1; + unsigned no_instrument_function_entry_exit : 1; + unsigned no_limit_stack : 1; + __extension__ enum built_in_class built_in_class : 2; + + struct function *f; +}; +# 3116 "../../GCC/gcc/tree.h" +struct tree_type_decl +{ + struct tree_decl_non_common common; + +}; +# 3133 "../../GCC/gcc/tree.h" +struct tree_statement_list_node + +{ + struct tree_statement_list_node *prev; + struct tree_statement_list_node *next; + tree stmt; +}; + +struct tree_statement_list + +{ + struct tree_common common; + struct tree_statement_list_node *head; + struct tree_statement_list_node *tail; +}; +# 3159 "../../GCC/gcc/tree.h" +struct value_set; + +struct tree_value_handle +{ + struct tree_common common; + + + struct value_set * expr_set; + + + + + unsigned int id; + + + VEC_tree_gc *vuses; +}; + + + + + +union tree_node + +{ + struct tree_common common; + struct tree_int_cst int_cst; + struct tree_real_cst real_cst; + struct tree_vector vector; + struct tree_string string; + struct tree_complex complex; + struct tree_identifier identifier; + struct tree_decl_minimal decl_minimal; + struct tree_decl_common decl_common; + struct tree_decl_with_rtl decl_with_rtl; + struct tree_decl_non_common decl_non_common; + struct tree_parm_decl parm_decl; + struct tree_decl_with_vis decl_with_vis; + struct tree_var_decl var_decl; + struct tree_field_decl field_decl; + struct tree_label_decl label_decl; + struct tree_result_decl result_decl; + struct tree_const_decl const_decl; + struct tree_type_decl type_decl; + struct tree_function_decl function_decl; + struct tree_type type; + struct tree_list list; + struct tree_vec vec; + struct tree_exp exp; + struct tree_ssa_name ssa_name; + struct tree_phi_node phi; + struct tree_block block; + struct tree_binfo binfo; + struct tree_statement_list stmt_list; + struct tree_value_handle value_handle; + struct tree_constructor constructor; + struct tree_memory_tag mtag; + struct tree_struct_field_tag sft; + struct tree_omp_clause omp_clause; +}; + + + +enum tree_index +{ + TI_ERROR_MARK, + TI_INTQI_TYPE, + TI_INTHI_TYPE, + TI_INTSI_TYPE, + TI_INTDI_TYPE, + TI_INTTI_TYPE, + + TI_UINTQI_TYPE, + TI_UINTHI_TYPE, + TI_UINTSI_TYPE, + TI_UINTDI_TYPE, + TI_UINTTI_TYPE, + + TI_INTEGER_ZERO, + TI_INTEGER_ONE, + TI_INTEGER_MINUS_ONE, + TI_NULL_POINTER, + + TI_SIZE_ZERO, + TI_SIZE_ONE, + + TI_BITSIZE_ZERO, + TI_BITSIZE_ONE, + TI_BITSIZE_UNIT, + + TI_PUBLIC, + TI_PROTECTED, + TI_PRIVATE, + + TI_BOOLEAN_FALSE, + TI_BOOLEAN_TRUE, + + TI_COMPLEX_INTEGER_TYPE, + TI_COMPLEX_FLOAT_TYPE, + TI_COMPLEX_DOUBLE_TYPE, + TI_COMPLEX_LONG_DOUBLE_TYPE, + + TI_FLOAT_TYPE, + TI_DOUBLE_TYPE, + TI_LONG_DOUBLE_TYPE, + + TI_FLOAT_PTR_TYPE, + TI_DOUBLE_PTR_TYPE, + TI_LONG_DOUBLE_PTR_TYPE, + TI_INTEGER_PTR_TYPE, + + TI_VOID_TYPE, + TI_PTR_TYPE, + TI_CONST_PTR_TYPE, + TI_SIZE_TYPE, + TI_PID_TYPE, + TI_PTRDIFF_TYPE, + TI_VA_LIST_TYPE, + TI_VA_LIST_GPR_COUNTER_FIELD, + TI_VA_LIST_FPR_COUNTER_FIELD, + TI_BOOLEAN_TYPE, + TI_FILEPTR_TYPE, + + TI_DFLOAT32_TYPE, + TI_DFLOAT64_TYPE, + TI_DFLOAT128_TYPE, + TI_DFLOAT32_PTR_TYPE, + TI_DFLOAT64_PTR_TYPE, + TI_DFLOAT128_PTR_TYPE, + + TI_VOID_LIST_NODE, + + TI_MAIN_IDENTIFIER, + + TI_MAX +}; + +extern tree global_trees[TI_MAX]; +# 3383 "../../GCC/gcc/tree.h" +enum integer_type_kind +{ + itk_char, + itk_signed_char, + itk_unsigned_char, + itk_short, + itk_unsigned_short, + itk_int, + itk_unsigned_int, + itk_long, + itk_unsigned_long, + itk_long_long, + itk_unsigned_long_long, + itk_none +}; + +typedef enum integer_type_kind integer_type_kind; + + + +extern tree integer_types[itk_none]; +# 3419 "../../GCC/gcc/tree.h" +extern enum tls_model flag_tls_default; +# 3443 "../../GCC/gcc/tree.h" +enum ptrmemfunc_vbit_where_t +{ + ptrmemfunc_vbit_in_pfn, + ptrmemfunc_vbit_in_delta +}; + + + +extern tree decl_assembler_name (tree); + + + + +extern size_t tree_size (tree); + + + + +extern size_t tree_code_size (enum tree_code); + + + + + +extern tree make_node_stat (enum tree_code ); + + + + +extern tree copy_node_stat (tree ); + + + + +extern tree copy_list (tree); + + +extern tree make_tree_binfo_stat (unsigned ); + + + + +extern tree make_tree_vec_stat (int ); + + + + +extern void init_phinodes (void); +extern void fini_phinodes (void); +extern void release_phi_node (tree); + + + + +extern void init_ssanames (void); +extern void fini_ssanames (void); +extern tree make_ssa_name (tree, tree); +extern tree duplicate_ssa_name (tree, tree); +extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *); +extern void release_ssa_name (tree); +extern void release_defs (tree); +extern void replace_ssa_name_symbol (tree, tree); +# 3513 "../../GCC/gcc/tree.h" +extern tree get_identifier (const char *); +# 3526 "../../GCC/gcc/tree.h" +extern tree get_identifier_with_length (const char *, size_t); + + + + + +extern tree maybe_get_identifier (const char *); + + + +extern tree build_nt (enum tree_code, ...); + +extern tree build0_stat (enum tree_code, tree ); + +extern tree build1_stat (enum tree_code, tree, tree ); + +extern tree build2_stat (enum tree_code, tree, tree, tree ); + +extern tree build3_stat (enum tree_code, tree, tree, tree, tree ); + +extern tree build4_stat (enum tree_code, tree, tree, tree, tree, + tree ); + +extern tree build5_stat (enum tree_code, tree, tree, tree, tree, tree, + tree ); + +extern tree build7_stat (enum tree_code, tree, tree, tree, tree, tree, + tree, tree, tree ); + + + +extern tree build_int_cst (tree, long); +extern tree build_int_cst_type (tree, long); +extern tree build_int_cstu (tree, unsigned long); +extern tree build_int_cst_wide (tree, unsigned long, long); +extern tree build_vector (tree, tree); +extern tree build_vector_from_ctor (tree, VEC_constructor_elt_gc *); +extern tree build_constructor (tree, VEC_constructor_elt_gc *); +extern tree build_constructor_single (tree, tree, tree); +extern tree build_constructor_from_list (tree, tree); +extern tree build_real_from_int_cst (tree, tree); +extern tree build_complex (tree, tree, tree); +extern tree build_one_cst (tree); +extern tree build_string (int, const char *); +extern tree build_tree_list_stat (tree, tree ); + +extern tree build_decl_stat (enum tree_code, tree, tree ); +extern tree build_fn_decl (const char *, tree); + +extern tree build_block (tree, tree, tree, tree); + +extern void annotate_with_file_line (tree, const char *, int); +extern void annotate_with_locus (tree, location_t); + +extern tree build_empty_stmt (void); +extern tree build_omp_clause (enum omp_clause_code); + + + +extern tree make_signed_type (int); +extern tree make_unsigned_type (int); +extern tree signed_type_for (tree); +extern tree unsigned_type_for (tree); +extern void initialize_sizetypes (unsigned char); +extern void set_sizetype (tree); +extern void fixup_unsigned_type (tree); +extern tree build_pointer_type_for_mode (tree, enum machine_mode, unsigned char); +extern tree build_pointer_type (tree); +extern tree build_reference_type_for_mode (tree, enum machine_mode, unsigned char); +extern tree build_reference_type (tree); +extern tree build_vector_type_for_mode (tree, enum machine_mode); +extern tree build_vector_type (tree innertype, int nunits); +extern tree build_type_no_quals (tree); +extern tree build_index_type (tree); +extern tree build_index_2_type (tree, tree); +extern tree build_array_type (tree, tree); +extern tree build_function_type (tree, tree); +extern tree build_function_type_list (tree, ...); +extern tree build_method_type_directly (tree, tree, tree); +extern tree build_method_type (tree, tree); +extern tree build_offset_type (tree, tree); +extern tree build_complex_type (tree); +extern tree build_resx (int); +extern tree array_type_nelts (tree); +extern unsigned char in_array_bounds_p (tree); +extern unsigned char range_in_array_bounds_p (tree); + +extern tree value_member (tree, tree); +extern tree purpose_member (tree, tree); + +extern int attribute_list_equal (tree, tree); +extern int attribute_list_contained (tree, tree); +extern int tree_int_cst_equal (tree, tree); +extern int tree_int_cst_lt (tree, tree); +extern int tree_int_cst_compare (tree, tree); +extern int host_integerp (tree, int); +extern long tree_low_cst (tree, int); +extern int tree_int_cst_msb (tree); +extern int tree_int_cst_sgn (tree); +extern int tree_int_cst_sign_bit (tree); +extern int tree_expr_nonnegative_p (tree); +extern int tree_expr_nonnegative_warnv_p (tree, unsigned char *); +extern unsigned char may_negate_without_overflow_p (tree); +extern tree get_inner_array_type (tree); + + + + + +extern tree make_tree (tree, rtx); + + + + + + + +extern tree build_type_attribute_variant (tree, tree); +extern tree build_decl_attribute_variant (tree, tree); + + +struct attribute_spec +{ + + + const char *const name; + + const int min_length; + + + const int max_length; + + + + + + + + const unsigned char decl_required; + + + const unsigned char type_required; + + + + + const unsigned char function_type_required; +# 3687 "../../GCC/gcc/tree.h" + tree (*const handler) (tree *node, tree name, tree args, + int flags, unsigned char *no_add_attrs); +}; + + + +enum attribute_flags +{ + + + + ATTR_FLAG_DECL_NEXT = 1, + + + + ATTR_FLAG_FUNCTION_NEXT = 2, + + + + ATTR_FLAG_ARRAY_NEXT = 4, + + + ATTR_FLAG_TYPE_IN_PLACE = 8, + + + + ATTR_FLAG_BUILT_IN = 16 +}; + + + +extern tree merge_decl_attributes (tree, tree); +extern tree merge_type_attributes (tree, tree); + + + + +extern int is_attribute_p (const char *, tree); + + + + +extern tree lookup_attribute (const char *, tree); + + + + +extern tree remove_attribute (const char *, tree); + + + +extern tree merge_attributes (tree, tree); +# 3752 "../../GCC/gcc/tree.h" +extern unsigned char check_qualified_type (tree, tree, int); + + + + + +extern tree get_qualified_type (tree, int); + + + + +extern tree build_qualified_type (tree, int); +# 3777 "../../GCC/gcc/tree.h" +extern tree build_distinct_type_copy (tree); +extern tree build_variant_type_copy (tree); + + + + +extern void finish_builtin_struct (tree, const char *, + tree, tree); + + + + + +extern void layout_type (tree); +# 3799 "../../GCC/gcc/tree.h" +typedef struct record_layout_info_s +{ + + tree t; + + + tree offset; + + unsigned int offset_align; + + tree bitpos; + + unsigned int record_align; + + + unsigned int unpacked_align; + + tree prev_field; + + + tree pending_statics; + + int remaining_in_alignment; + + + int packed_maybe_necessary; +} *record_layout_info; + +extern void set_lang_adjust_rli (void (*) (record_layout_info)); +extern record_layout_info start_record_layout (tree); +extern tree bit_from_pos (tree, tree); +extern tree byte_from_pos (tree, tree); +extern void pos_from_bit (tree *, tree *, unsigned int, tree); +extern void normalize_offset (tree *, tree *, unsigned int); +extern tree rli_size_unit_so_far (record_layout_info); +extern tree rli_size_so_far (record_layout_info); +extern void normalize_rli (record_layout_info); +extern void place_field (record_layout_info, tree); +extern void compute_record_mode (tree); +extern void finish_record_layout (record_layout_info, int); + + + + + + +extern tree type_hash_canon (unsigned int, tree); +# 3855 "../../GCC/gcc/tree.h" +extern void layout_decl (tree, unsigned); + + + + +extern void relayout_decl (tree); + + + + + + +extern enum machine_mode mode_for_size_tree (tree, enum mode_class, int); + + + +extern tree non_lvalue (tree); + +extern tree convert (tree, tree); +extern unsigned int expr_align (tree); +extern tree expr_first (tree); +extern tree expr_last (tree); +extern tree expr_only (tree); +extern tree size_in_bytes (tree); +extern long int_size_in_bytes (tree); +extern long max_int_size_in_bytes (tree); +extern tree bit_position (tree); +extern long int_bit_position (tree); +extern tree byte_position (tree); +extern long int_byte_position (tree); + + + + +enum size_type_kind +{ + SIZETYPE, + SSIZETYPE, + BITSIZETYPE, + SBITSIZETYPE, + TYPE_KIND_LAST}; + +extern tree sizetype_tab[(int) TYPE_KIND_LAST]; + + + + + + +extern tree size_int_kind (long, enum size_type_kind); +extern tree size_binop (enum tree_code, tree, tree); +extern tree size_diffop (tree, tree); + + + + + + +extern tree round_up (tree, int); +extern tree round_down (tree, int); +extern tree get_pending_sizes (void); +extern void put_pending_size (tree); +extern void put_pending_sizes (tree); +# 3927 "../../GCC/gcc/tree.h" +extern unsigned int maximum_field_alignment; + +extern unsigned int initial_max_fld_align; + + + + + +extern tree chainon (tree, tree); + + + +extern tree tree_cons_stat (tree, tree, tree ); + + + + +extern tree tree_last (tree); + + + +extern tree nreverse (tree); + + + + +extern int list_length (tree); + + + +extern int fields_length (tree); + + + + +extern unsigned char initializer_zerop (tree); +# 3975 "../../GCC/gcc/tree.h" +extern unsigned char categorize_ctor_elements (tree, long *, long *, + unsigned char *); + +extern long count_type_elements (tree, unsigned char); + + + +extern int integer_zerop (tree); + + + +extern int integer_onep (tree); + + + + +extern int integer_all_onesp (tree); + + + + +extern int integer_pow2p (tree); + + + + +extern int integer_nonzerop (tree); + +extern unsigned char zero_p (tree); +extern unsigned char cst_and_fits_in_hwi (tree); +extern tree num_ending_zeros (tree); + + + + +extern tree staticp (tree); + + + + + +extern tree save_expr (tree); + + + + +extern tree skip_simple_arithmetic (tree); + + + +enum tree_node_structure_enum tree_node_structure (tree); + + + + + + + +extern unsigned char contains_placeholder_p (tree); +# 4045 "../../GCC/gcc/tree.h" +extern unsigned char type_contains_placeholder_p (tree); + + + + + + +extern tree substitute_in_expr (tree, tree, tree); +# 4063 "../../GCC/gcc/tree.h" +extern tree substitute_placeholder_in_expr (tree, tree); +# 4078 "../../GCC/gcc/tree.h" +extern tree variable_size (tree); + + + + + +extern tree stabilize_reference (tree); + + + + + +extern tree stabilize_reference_1 (tree); + + + + + + +extern tree get_unwidened (tree, tree); + + + + + + +extern tree get_narrower (tree, int *); + + + + + +extern tree get_inner_reference (tree, long *, long *, + tree *, enum machine_mode *, int *, int *, + unsigned char); + + + + + +extern unsigned char contains_packed_reference (tree exp); + + + +extern int handled_component_p (tree); + + + + +extern tree array_ref_element_size (tree); + + + + +extern tree array_ref_low_bound (tree); + + + + +extern tree array_ref_up_bound (tree); + + + + +extern tree component_ref_field_offset (tree); + + + + +extern tree get_containing_scope (tree); + + + +extern tree decl_function_context (tree); + + + +extern tree decl_type_context (tree); + + +extern int real_zerop (tree); + + + + + + +extern int pedantic_lvalues; + + + +extern tree current_function_decl; + + +extern const char * current_function_func_begin_label; + + +extern unsigned crc32_string (unsigned, const char *); +extern void clean_symbol_name (char *); +extern tree get_file_function_name_long (const char *); +extern tree get_callee_fndecl (tree); +extern void change_decl_assembler_name (tree, tree); +extern int type_num_arguments (tree); +extern unsigned char associative_tree_code (enum tree_code); +extern unsigned char commutative_tree_code (enum tree_code); +extern tree upper_bound_in_type (tree, tree); +extern tree lower_bound_in_type (tree, tree); +extern int operand_equal_for_phi_arg_p (tree, tree); +extern unsigned char empty_body_p (tree); + + + +extern void expand_expr_stmt (tree); +extern int warn_if_unused_value (tree, location_t); +extern void expand_label (tree); +extern void expand_goto (tree); + +extern rtx expand_stack_save (void); +extern void expand_stack_restore (tree); +extern void expand_return (tree); +extern int is_body_block (tree); + + +extern void using_eh_for_cleanups (void); + + + + + +extern int folding_initializer; + + + + + + + +extern tree fold (tree); +extern tree fold_unary (enum tree_code, tree, tree); +extern tree fold_binary (enum tree_code, tree, tree, tree); +extern tree fold_ternary (enum tree_code, tree, tree, tree, tree); +extern tree fold_build1_stat (enum tree_code, tree, tree ); + +extern tree fold_build2_stat (enum tree_code, tree, tree, tree ); + +extern tree fold_build3_stat (enum tree_code, tree, tree, tree, tree ); + +extern tree fold_build1_initializer (enum tree_code, tree, tree); +extern tree fold_build2_initializer (enum tree_code, tree, tree, tree); +extern tree fold_build3_initializer (enum tree_code, tree, tree, tree, tree); +extern tree fold_convert (tree, tree); +extern tree fold_single_bit_test (enum tree_code, tree, tree, tree); +extern tree fold_ignored_result (tree); +extern tree fold_abs_const (tree, tree); +extern tree fold_indirect_ref_1 (tree, tree); +extern void fold_defer_overflow_warnings (void); +extern void fold_undefer_overflow_warnings (unsigned char, tree, int); +extern void fold_undefer_and_ignore_overflow_warnings (void); +extern unsigned char fold_deferring_overflow_warnings_p (void); + +extern tree force_fit_type (tree, int, unsigned char, unsigned char); + +extern int add_double_with_sign (unsigned long, long, + unsigned long, long, + unsigned long *, long *, + unsigned char); + + +extern int neg_double (unsigned long, long, + unsigned long *, long *); +extern int mul_double_with_sign (unsigned long, long, + unsigned long, long, + unsigned long *, long *, + unsigned char); + + +extern void lshift_double (unsigned long, long, + long, unsigned int, + unsigned long *, long *, int); +extern void rshift_double (unsigned long, long, + long, unsigned int, + unsigned long *, long *, int); +extern void lrotate_double (unsigned long, long, + long, unsigned int, + unsigned long *, long *); +extern void rrotate_double (unsigned long, long, + long, unsigned int, + unsigned long *, long *); + +extern int div_and_round_double (enum tree_code, int, unsigned long, + long, unsigned long, + long, unsigned long *, + long *, unsigned long *, + long *); + +enum operand_equal_flag +{ + OEP_ONLY_CONST = 1, + OEP_PURE_SAME = 2 +}; + +extern int operand_equal_p (tree, tree, unsigned int); + +extern tree omit_one_operand (tree, tree, tree); +extern tree omit_two_operands (tree, tree, tree, tree); +extern tree invert_truthvalue (tree); +extern tree fold_truth_not_expr (tree); +extern tree fold_unary_to_constant (enum tree_code, tree, tree); +extern tree fold_binary_to_constant (enum tree_code, tree, tree, tree); +extern tree fold_read_from_constant_string (tree); +extern tree int_const_binop (enum tree_code, tree, tree, int); +extern tree build_fold_addr_expr (tree); +extern tree fold_build_cleanup_point_expr (tree type, tree expr); +extern tree fold_strip_sign_ops (tree); +extern tree build_fold_addr_expr_with_type (tree, tree); +extern tree build_fold_indirect_ref (tree); +extern tree fold_indirect_ref (tree); +extern tree constant_boolean_node (int, tree); +extern tree build_low_bits_mask (tree, unsigned); + +extern unsigned char tree_swap_operands_p (tree, tree, unsigned char); +extern void swap_tree_operands (tree, tree *, tree *); +extern enum tree_code swap_tree_comparison (enum tree_code); + +extern unsigned char ptr_difference_const (tree, tree, long *); +extern enum tree_code invert_tree_comparison (enum tree_code, unsigned char); + +extern unsigned char tree_expr_nonzero_p (tree); +extern unsigned char tree_expr_nonzero_warnv_p (tree, unsigned char *); + + +extern tree fold_builtin (tree, tree, unsigned char); +extern tree fold_builtin_fputs (tree, unsigned char, unsigned char, tree); +extern tree fold_builtin_strcpy (tree, tree, tree); +extern tree fold_builtin_strncpy (tree, tree, tree); +extern tree fold_builtin_memory_chk (tree, tree, tree, unsigned char, + enum built_in_function); +extern tree fold_builtin_stxcpy_chk (tree, tree, tree, unsigned char, + enum built_in_function); +extern tree fold_builtin_strncpy_chk (tree, tree); +extern tree fold_builtin_snprintf_chk (tree, tree, enum built_in_function); +extern unsigned char fold_builtin_next_arg (tree); +extern enum built_in_function builtin_mathfn_code (tree); +extern tree build_function_call_expr (tree, tree); +extern tree mathfn_built_in (tree, enum built_in_function fn); +extern tree strip_float_extensions (tree); +extern tree c_strlen (tree, int); +extern tree std_gimplify_va_arg_expr (tree, tree, tree *, tree *); +extern tree build_va_arg_indirect_ref (tree); +tree build_string_literal (int, const char *); + + +extern tree strip_float_extensions (tree); + + +extern void record_component_aliases (tree); +extern long get_alias_set (tree); +extern int alias_sets_conflict_p (long, long); +extern int alias_sets_might_conflict_p (long, long); +extern int objects_must_conflict_p (tree, tree); + + +extern int really_constant_p (tree); +extern int int_fits_type_p (tree, tree); +extern unsigned char variably_modified_type_p (tree, tree); +extern int tree_log2 (tree); +extern int tree_floor_log2 (tree); +extern int simple_cst_equal (tree, tree); +extern hashval_t iterative_hash_expr (tree, hashval_t); +extern int compare_tree_int (tree, unsigned long); +extern int type_list_equal (tree, tree); +extern int chain_member (tree, tree); +extern tree type_hash_lookup (unsigned int, tree); +extern void type_hash_add (unsigned int, tree); +extern int simple_cst_list_equal (tree, tree); +extern void dump_tree_statistics (void); +extern void expand_function_end (void); +extern void expand_function_start (tree); +extern void stack_protect_prologue (void); +extern void stack_protect_epilogue (void); +extern void recompute_tree_invariant_for_addr_expr (tree); +extern unsigned char is_global_var (tree t); +extern unsigned char needs_to_live_in_memory (tree); +extern tree reconstruct_complex_type (tree, tree); + +extern int real_onep (tree); +extern int real_twop (tree); +extern int real_minus_onep (tree); +extern void init_ttree (void); +extern void build_common_tree_nodes (unsigned char, unsigned char); +extern void build_common_tree_nodes_2 (int); +extern void build_common_builtin_nodes (void); +extern tree build_nonstandard_integer_type (unsigned long, int); +extern tree build_range_type (tree, tree, tree); +extern long int_cst_value (tree); +extern tree tree_fold_gcd (tree, tree); +extern tree build_addr (tree, tree); + +extern unsigned char fields_compatible_p (tree, tree); +extern tree find_compatible_field (tree, tree); + + +extern void expand_main_function (void); +extern void init_dummy_function_start (void); +extern void expand_dummy_function_end (void); +extern unsigned int init_function_for_compilation (void); +extern void allocate_struct_function (tree); +extern void init_function_start (tree); +extern unsigned char use_register_for_decl (tree); +extern void setjmp_vars_warning (tree); +extern void setjmp_args_warning (void); +extern void init_temp_slots (void); +extern void free_temp_slots (void); +extern void pop_temp_slots (void); +extern void push_temp_slots (void); +extern void preserve_temp_slots (rtx); +extern int aggregate_value_p (tree, tree); +extern void push_function_context (void); +extern void pop_function_context (void); +extern void push_function_context_to (tree); +extern void pop_function_context_from (tree); +extern tree gimplify_parameters (void); + + + +extern void print_rtl (FILE *, rtx); + + + +extern void debug_tree (tree); + +extern void dump_addr (FILE*, const char *, void *); +extern void print_node (FILE *, const char *, tree, int); +extern void print_node_brief (FILE *, const char *, tree, int); +extern void indent_to (FILE *, int); + + + +extern unsigned char debug_find_tree (tree, tree); + + +extern tree unsave_expr_now (tree); +extern tree build_duplicate_type (tree); + + +extern rtx emit_line_note (location_t); +# 4455 "../../GCC/gcc/tree.h" +extern int flags_from_decl_or_type (tree); +extern int call_expr_flags (tree); + +extern int setjmp_call_p (tree); +extern unsigned char alloca_call_p (tree); +extern unsigned char must_pass_in_stack_var_size (enum machine_mode, tree); +extern unsigned char must_pass_in_stack_var_size_or_pad (enum machine_mode, tree); +# 4473 "../../GCC/gcc/tree.h" +extern tree decl_attributes (tree *, tree, int); + + +extern void set_decl_abstract_flags (tree, int); +extern void set_decl_origin_self (tree); + + +extern void set_min_and_max_values_for_integral_type (tree, int, unsigned char); +extern void fixup_signed_type (tree); +extern void internal_reference_types (void); +extern unsigned int update_alignment_for_field (record_layout_info, tree, + unsigned int); + +extern void make_decl_rtl (tree); +extern void make_decl_one_only (tree); +extern int supports_one_only (void); +extern void resolve_unique_section (tree, int, int); +extern void mark_referenced (tree); +extern void mark_decl_referenced (tree); +extern void notice_global_symbol (tree); +extern void set_user_assembler_name (tree, const char *); +extern void process_pending_assemble_externals (void); +extern void finish_aliases_1 (void); +extern void finish_aliases_2 (void); + + +extern void expand_computed_goto (tree); +extern unsigned char parse_output_constraint (const char **, int, int, int, + unsigned char *, unsigned char *, unsigned char *); +extern unsigned char parse_input_constraint (const char **, int, int, int, int, + const char * const *, unsigned char *, unsigned char *); +extern void expand_asm_expr (tree); +extern tree resolve_asm_operand_names (tree, tree, tree); +extern void expand_case (tree); +extern void expand_decl (tree); +extern void expand_anon_union_decl (tree, tree, tree); + + + + + + +extern tree create_artificial_label (void); +extern void gimplify_function_tree (tree); +extern const char *get_name (tree); +extern tree unshare_expr (tree); +extern void sort_case_labels (tree); + + + +extern tree get_file_function_name (int); + + + + + +extern char *dwarf2out_cfi_label (void); + + + +extern void dwarf2out_def_cfa (const char *, unsigned, long); + + + +extern void dwarf2out_window_save (const char *); + + + + +extern void dwarf2out_args_size (const char *, long); + + + +extern void dwarf2out_reg_save (const char *, unsigned, long); + + + +extern void dwarf2out_return_save (const char *, long); + + + +extern void dwarf2out_return_reg (const char *, unsigned); + + + +extern void dwarf2out_reg_save_reg (const char *, rtx, rtx); + + + + + +struct pointer_set_t; + + + +typedef tree (*walk_tree_fn) (tree *, int *, void *); +extern tree walk_tree (tree*, walk_tree_fn, void*, struct pointer_set_t*); +extern tree walk_tree_without_duplicates (tree*, walk_tree_fn, void*); + + + +extern void set_decl_rtl (tree, rtx); +extern void set_decl_incoming_rtl (tree, rtx); + + + +typedef enum +{ + d_kind, + t_kind, + b_kind, + s_kind, + r_kind, + e_kind, + c_kind, + id_kind, + perm_list_kind, + temp_list_kind, + vec_kind, + binfo_kind, + phi_kind, + ssa_name_kind, + constr_kind, + x_kind, + lang_decl, + lang_type, + omp_clause_kind, + all_kinds +} tree_node_kind; + +extern int tree_node_counts[]; +extern int tree_node_sizes[]; + + + + +extern unsigned char in_gimple_form; + + +extern tree get_base_address (tree t); + + +extern void vect_set_verbosity_level (const char *); + +struct tree_map +{ + unsigned int hash; + tree from; + tree to; +}; + +extern unsigned int tree_map_hash (const void *); +extern int tree_map_marked_p (const void *); +extern int tree_map_eq (const void *, const void *); + + +extern tree tree_mem_ref_addr (tree, tree); +extern void copy_mem_ref_info (tree, tree); + + +extern unsigned char ssa_name_nonzero_p (tree); +extern unsigned char ssa_name_nonnegative_p (tree); + + +extern void init_object_sizes (void); +extern void fini_object_sizes (void); +extern unsigned long compute_builtin_object_size (tree, int); + + +extern unsigned long highest_pow2_factor (tree); +# 44 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/rtl.h" 1 +# 27 "../../GCC/gcc/rtl.h" +# 1 "../../GCC/gcc/real.h" 1 +# 29 "../../GCC/gcc/real.h" +enum real_value_class { + rvc_zero, + rvc_normal, + rvc_inf, + rvc_nan +}; + + + + + + + +struct real_value +{ + + + + unsigned int cl : 2; + unsigned int decimal : 1; + unsigned int sign : 1; + unsigned int signalling : 1; + unsigned int canonical : 1; + unsigned int uexp : (32 - 6); + unsigned long sig[((128 + (8 * 4)) / (8 * 4))]; +}; +# 77 "../../GCC/gcc/real.h" +extern char test_real_width + [sizeof(struct real_value) <= (((128 + (8 * 4)) + 32)/(8 * 4) + (((128 + (8 * 4)) + 32)%(8 * 4) ? 1 : 0))*sizeof(long) ? 1 : -1]; +# 115 "../../GCC/gcc/real.h" +struct real_format +{ + + void (*encode) (const struct real_format *, long *, + const struct real_value *); + void (*decode) (const struct real_format *, struct real_value *, + const long *); + + + int b; + + + int log2_b; + + + int p; + + + int pnan; + + + int emin; + + + int emax; + + + + int signbit_ro; + + + + int signbit_rw; + + + unsigned char has_nans; + unsigned char has_inf; + unsigned char has_denorm; + unsigned char has_signed_zero; + unsigned char qnan_msb_set; +}; + + + + + + + +extern const struct real_format * + real_format_for_mode[MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1 + + MAX_MODE_DECIMAL_FLOAT - MIN_MODE_DECIMAL_FLOAT + 1]; +# 182 "../../GCC/gcc/real.h" +extern unsigned char real_arithmetic (struct real_value *, int, const struct real_value *, + const struct real_value *); + + +extern unsigned char real_compare (int, const struct real_value *, const struct real_value *); + + +extern unsigned char real_isinf (const struct real_value *); + + +extern unsigned char real_isnan (const struct real_value *); + + +extern unsigned char real_isneg (const struct real_value *); + + +extern unsigned char real_isnegzero (const struct real_value *); + + +extern unsigned char real_identical (const struct real_value *, const struct real_value *); + + +extern void real_convert (struct real_value *, enum machine_mode, + const struct real_value *); + + +extern unsigned char exact_real_truncate (enum machine_mode, const struct real_value *); + + +extern void real_to_decimal (char *, const struct real_value *, size_t, + size_t, int); + + +extern void real_to_hexadecimal (char *, const struct real_value *, + size_t, size_t, int); + + +extern long real_to_integer (const struct real_value *); +extern void real_to_integer2 (long *, long *, + const struct real_value *); + + +extern void real_from_string (struct real_value *, const char *); + +extern void real_from_string3 (struct real_value *, const char *, enum machine_mode); + + +extern void real_from_integer (struct real_value *, enum machine_mode, + unsigned long, long, int); + +extern long real_to_target_fmt (long *, const struct real_value *, + const struct real_format *); +extern long real_to_target (long *, const struct real_value *, enum machine_mode); + +extern void real_from_target_fmt (struct real_value *, const long *, + const struct real_format *); +extern void real_from_target (struct real_value *, const long *, + enum machine_mode); + +extern void real_inf (struct real_value *); + +extern unsigned char real_nan (struct real_value *, const char *, int, enum machine_mode); + +extern void real_maxval (struct real_value *, int, enum machine_mode); + +extern void real_2expN (struct real_value *, int); + +extern unsigned int real_hash (const struct real_value *); + + + +extern const struct real_format ieee_single_format; +extern const struct real_format mips_single_format; +extern const struct real_format ieee_double_format; +extern const struct real_format mips_double_format; +extern const struct real_format ieee_extended_motorola_format; +extern const struct real_format ieee_extended_intel_96_format; +extern const struct real_format ieee_extended_intel_96_round_53_format; +extern const struct real_format ieee_extended_intel_128_format; +extern const struct real_format ibm_extended_format; +extern const struct real_format mips_extended_format; +extern const struct real_format ieee_quad_format; +extern const struct real_format mips_quad_format; +extern const struct real_format vax_f_format; +extern const struct real_format vax_d_format; +extern const struct real_format vax_g_format; +extern const struct real_format i370_single_format; +extern const struct real_format i370_double_format; +extern const struct real_format c4x_single_format; +extern const struct real_format c4x_extended_format; +extern const struct real_format real_internal_format; +extern const struct real_format decimal_single_format; +extern const struct real_format decimal_double_format; +extern const struct real_format decimal_quad_format; +# 331 "../../GCC/gcc/real.h" +extern struct real_value real_value_truncate (enum machine_mode, + struct real_value); + + + + +extern struct real_value real_arithmetic2 (int, const struct real_value *, + const struct real_value *); + + + + + + + +extern int significand_size (enum machine_mode); + +extern struct real_value real_from_string2 (const char *, enum machine_mode); +# 366 "../../GCC/gcc/real.h" +extern int real_exponent (const struct real_value *); + + +extern void real_ldexp (struct real_value *, const struct real_value *, int); + + + + + +extern struct real_value dconst0; +extern struct real_value dconst1; +extern struct real_value dconst2; +extern struct real_value dconst3; +extern struct real_value dconst10; +extern struct real_value dconstm1; +extern struct real_value dconstm2; +extern struct real_value dconsthalf; +extern struct real_value dconstthird; +extern struct real_value dconstpi; +extern struct real_value dconste; + + + +struct real_value real_value_from_int_cst (tree, tree); +# 398 "../../GCC/gcc/real.h" +extern rtx const_double_from_real_value (struct real_value, enum machine_mode); + + +extern unsigned char exact_real_inverse (enum machine_mode, struct real_value *); + + +extern tree build_real (tree, struct real_value); + + +extern unsigned char real_sqrt (struct real_value *, enum machine_mode, + const struct real_value *); + + +extern unsigned char real_powi (struct real_value *, enum machine_mode, + const struct real_value *, long); + + +extern void real_trunc (struct real_value *, enum machine_mode, + const struct real_value *); +extern void real_floor (struct real_value *, enum machine_mode, + const struct real_value *); +extern void real_ceil (struct real_value *, enum machine_mode, + const struct real_value *); +extern void real_round (struct real_value *, enum machine_mode, + const struct real_value *); + + +extern void real_copysign (struct real_value *, const struct real_value *); +# 28 "../../GCC/gcc/rtl.h" 2 +# 42 "../../GCC/gcc/rtl.h" +enum rtx_code { + + +# 1 "../../GCC/gcc/rtl.def" 1 +# 81 "../../GCC/gcc/rtl.def" +UNKNOWN , + + + + + + +EXPR_LIST , + + + +INSN_LIST , + + + + +DEPS_LIST , + + + + + +SEQUENCE , + + +ADDRESS , +# 119 "../../GCC/gcc/rtl.def" +INSN , + + + +JUMP_INSN , + + + + + + +CALL_INSN , + + +BARRIER , + + + + + + + +CODE_LABEL , +# 156 "../../GCC/gcc/rtl.def" +NOTE , +# 169 "../../GCC/gcc/rtl.def" +COND_EXEC , + + +PARALLEL , + + + + + + + +ASM_INPUT , +# 208 "../../GCC/gcc/rtl.def" +ASM_OPERANDS , +# 220 "../../GCC/gcc/rtl.def" +UNSPEC , + + +UNSPEC_VOLATILE , + + + +ADDR_VEC , +# 252 "../../GCC/gcc/rtl.def" +ADDR_DIFF_VEC , +# 263 "../../GCC/gcc/rtl.def" +PREFETCH , +# 275 "../../GCC/gcc/rtl.def" +SET , + + + + +USE , + + + + +CLOBBER , + + + + + +CALL , + + + +RETURN , + + + + + +TRAP_IF , + + + + +RESX , + + + + + + +CONST_INT , + + + + +CONST_DOUBLE , + + +CONST_VECTOR , + + + + +CONST_STRING , + + + + + +CONST , + + + +PC , + + + + +VALUE , +# 351 "../../GCC/gcc/rtl.def" +REG , + + + + + + +SCRATCH , +# 368 "../../GCC/gcc/rtl.def" +SUBREG , +# 381 "../../GCC/gcc/rtl.def" +STRICT_LOW_PART , + + + + + +CONCAT , + + + + +MEM , + + + +LABEL_REF , + + + + + + +SYMBOL_REF , + + + + + + +CC0 , +# 422 "../../GCC/gcc/rtl.def" +IF_THEN_ELSE , + + +COMPARE , + + +PLUS , + + +MINUS , + + +NEG , + +MULT , + + +DIV , + +MOD , + + +UDIV , +UMOD , + + +AND , +IOR , +XOR , +NOT , + + + + +ASHIFT , +ROTATE , +ASHIFTRT , +LSHIFTRT , +ROTATERT , +# 469 "../../GCC/gcc/rtl.def" +SMIN , +SMAX , +UMIN , +UMAX , +# 481 "../../GCC/gcc/rtl.def" +PRE_DEC , +PRE_INC , +POST_DEC , +POST_INC , +# 498 "../../GCC/gcc/rtl.def" +PRE_MODIFY , +POST_MODIFY , + + + +NE , +EQ , +GE , +GT , +LE , +LT , +GEU , +GTU , +LEU , +LTU , + + +UNORDERED , +ORDERED , + + +UNEQ , +UNGE , +UNGT , +UNLE , +UNLT , + + +LTGT , + + + + +SIGN_EXTEND , + + +ZERO_EXTEND , + + +TRUNCATE , + + +FLOAT_EXTEND , +FLOAT_TRUNCATE , + + +FLOAT , + + + + + + + +FIX , + + +UNSIGNED_FLOAT , + + + + +UNSIGNED_FIX , + + +ABS , + + +SQRT , + + + + +FFS , + + +CLZ , + + +CTZ , + + +POPCOUNT , + + +PARITY , +# 595 "../../GCC/gcc/rtl.def" +SIGN_EXTRACT , + + + +ZERO_EXTRACT , + + + + +HIGH , + + + +LO_SUM , + + + + + + +VEC_MERGE , + + + + + +VEC_SELECT , + + + + +VEC_CONCAT , + + + + + +VEC_DUPLICATE , + + +SS_PLUS , + + +US_PLUS , + + +SS_MINUS , + + +SS_NEG , + + +SS_ASHIFT , + + +US_MINUS , + + +SS_TRUNCATE , + + +US_TRUNCATE , + + +VAR_LOCATION , +# 46 "../../GCC/gcc/rtl.h" 2 + + + LAST_AND_UNUSED_RTX_CODE}; +# 57 "../../GCC/gcc/rtl.h" +enum rtx_class { + + + + + RTX_COMPARE, + RTX_COMM_COMPARE, + RTX_BIN_ARITH, + RTX_COMM_ARITH, + + + RTX_UNARY, + + RTX_EXTRA, + RTX_MATCH, + RTX_INSN, + + + RTX_OBJ, + RTX_CONST_OBJ, + + RTX_TERNARY, + RTX_BITFIELD_OPS, + RTX_AUTOINC +}; +# 95 "../../GCC/gcc/rtl.h" +extern const unsigned char rtx_length[((int) LAST_AND_UNUSED_RTX_CODE)]; + + +extern const char * const rtx_name[((int) LAST_AND_UNUSED_RTX_CODE)]; + + +extern const char * const rtx_format[((int) LAST_AND_UNUSED_RTX_CODE)]; + + +extern const enum rtx_class rtx_class[((int) LAST_AND_UNUSED_RTX_CODE)]; + + +extern const unsigned char rtx_code_size[((int) LAST_AND_UNUSED_RTX_CODE)]; +extern const unsigned char rtx_next[((int) LAST_AND_UNUSED_RTX_CODE)]; + + + +typedef struct +{ + + unsigned min_align: 8; + + unsigned base_after_vec: 1; + unsigned min_after_vec: 1; + + unsigned max_after_vec: 1; + + unsigned min_after_base: 1; + + unsigned max_after_base: 1; + + + unsigned offset_unsigned: 1; + unsigned : 2; + unsigned scale : 8; +} addr_diff_vec_flags; +# 139 "../../GCC/gcc/rtl.h" +typedef struct mem_attrs +{ + long alias; + tree expr; + rtx offset; + rtx size; + unsigned int align; +} mem_attrs; + + + + +typedef struct reg_attrs +{ + tree decl; + long offset; +} reg_attrs; + + + +union rtunion_def +{ + int rt_int; + unsigned int rt_uint; + const char *rt_str; + rtx rt_rtx; + rtvec rt_rtvec; + enum machine_mode rt_type; + addr_diff_vec_flags rt_addr_diff_vec_flags; + struct cselib_val_struct *rt_cselib; + struct bitmap_head_def *rt_bit; + tree rt_tree; + struct basic_block_def *rt_bb; + mem_attrs *rt_mem; + reg_attrs *rt_reg; + struct constant_descriptor_rtx *rt_constant; +}; +typedef union rtunion_def rtunion; + + + + +struct block_symbol { + + rtunion fld[3]; + + + struct object_block *block; + + + + long offset; +}; + +static __inline__ void VEC_rtx_must_be_pointer_type (void) { (void)((rtx)1 == (void *)1); } typedef struct VEC_rtx_base { unsigned num; unsigned alloc; rtx vec[1]; } VEC_rtx_base; typedef struct VEC_rtx_none { VEC_rtx_base base; } VEC_rtx_none; static __inline__ unsigned VEC_rtx_base_length (const VEC_rtx_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ rtx VEC_rtx_base_last (const VEC_rtx_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ rtx VEC_rtx_base_index (const VEC_rtx_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_rtx_base_iterate (const VEC_rtx_base *vec_, unsigned ix_, rtx *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_rtx_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_rtx_base, vec) + alloc_ * sizeof(rtx); } static __inline__ void VEC_rtx_base_embedded_init (VEC_rtx_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_rtx_base_space (VEC_rtx_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ rtx *VEC_rtx_base_quick_push (VEC_rtx_base *vec_, rtx obj_ ) { rtx *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ rtx VEC_rtx_base_pop (VEC_rtx_base *vec_ ) { rtx obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_rtx_base_truncate (VEC_rtx_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ rtx VEC_rtx_base_replace (VEC_rtx_base *vec_, unsigned ix_, rtx obj_ ) { rtx old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ rtx *VEC_rtx_base_quick_insert (VEC_rtx_base *vec_, unsigned ix_, rtx obj_ ) { rtx *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (rtx)); *slot_ = obj_; return slot_; } static __inline__ rtx VEC_rtx_base_ordered_remove (VEC_rtx_base *vec_, unsigned ix_ ) { rtx *slot_; rtx obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (rtx)); return obj_; } static __inline__ rtx VEC_rtx_base_unordered_remove (VEC_rtx_base *vec_, unsigned ix_ ) { rtx *slot_; rtx obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_rtx_base_block_remove (VEC_rtx_base *vec_, unsigned ix_, unsigned len_ ) { rtx *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (rtx)); } static __inline__ rtx *VEC_rtx_base_address (VEC_rtx_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_rtx_base_lower_bound (VEC_rtx_base *vec_, const rtx obj_, unsigned char (*lessthan_)(const rtx, const rtx) ) { unsigned int len_ = VEC_rtx_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { rtx middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_rtx_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_rtx_heap { VEC_rtx_base base; } VEC_rtx_heap; static __inline__ VEC_rtx_heap *VEC_rtx_heap_alloc (int alloc_ ) { return (VEC_rtx_heap *) vec_heap_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_rtx_heap_free (VEC_rtx_heap **vec_) { if (*vec_) free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_rtx_heap *VEC_rtx_heap_copy (VEC_rtx_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_rtx_heap *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_rtx_heap *)(vec_heap_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (rtx) * len_); } return new_vec_; } static __inline__ int VEC_rtx_heap_reserve (VEC_rtx_heap **vec_, int alloc_ ) { int extend = !VEC_rtx_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_rtx_heap *) vec_heap_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_rtx_heap_reserve_exact (VEC_rtx_heap **vec_, int alloc_ ) { int extend = !VEC_rtx_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_rtx_heap *) vec_heap_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_rtx_heap_safe_grow (VEC_rtx_heap **vec_, int size_ ) { (void)(size_ >= 0 && VEC_rtx_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_rtx_heap_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ rtx *VEC_rtx_heap_safe_push (VEC_rtx_heap **vec_, rtx obj_ ) { VEC_rtx_heap_reserve (vec_, 1 ); return VEC_rtx_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ rtx *VEC_rtx_heap_safe_insert (VEC_rtx_heap **vec_, unsigned ix_, rtx obj_ ) { VEC_rtx_heap_reserve (vec_, 1 ); return VEC_rtx_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; +typedef struct VEC_rtx_gc { VEC_rtx_base base; } VEC_rtx_gc; static __inline__ VEC_rtx_gc *VEC_rtx_gc_alloc (int alloc_ ) { return (VEC_rtx_gc *) vec_gc_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_rtx_gc_free (VEC_rtx_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_rtx_gc *VEC_rtx_gc_copy (VEC_rtx_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_rtx_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_rtx_gc *)(vec_gc_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (rtx) * len_); } return new_vec_; } static __inline__ int VEC_rtx_gc_reserve (VEC_rtx_gc **vec_, int alloc_ ) { int extend = !VEC_rtx_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_rtx_gc *) vec_gc_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_rtx_gc_reserve_exact (VEC_rtx_gc **vec_, int alloc_ ) { int extend = !VEC_rtx_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_rtx_gc *) vec_gc_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_rtx_gc_safe_grow (VEC_rtx_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_rtx_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_rtx_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ rtx *VEC_rtx_gc_safe_push (VEC_rtx_gc **vec_, rtx obj_ ) { VEC_rtx_gc_reserve (vec_, 1 ); return VEC_rtx_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ rtx *VEC_rtx_gc_safe_insert (VEC_rtx_gc **vec_, unsigned ix_, rtx obj_ ) { VEC_rtx_gc_reserve (vec_, 1 ); return VEC_rtx_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; + + + +struct object_block +{ + + section *sect; + + + unsigned int alignment; + + + long size; +# 218 "../../GCC/gcc/rtl.h" + VEC_rtx_gc *objects; +# 228 "../../GCC/gcc/rtl.h" + VEC_rtx_gc *anchors; +}; + + + +struct rtx_def + +{ + + __extension__ enum rtx_code code: 16; + + + __extension__ enum machine_mode mode : 8; + + + + + + + unsigned int jump : 1; + + + unsigned int call : 1; + + + + + + + + unsigned int unchanging : 1; +# 267 "../../GCC/gcc/rtl.h" + unsigned int volatil : 1; +# 281 "../../GCC/gcc/rtl.h" + unsigned int in_struct : 1; + + + + + + + unsigned int used : 1; + + + + + + + unsigned frame_related : 1; + + + + unsigned return_val : 1; + + + + + union u { + rtunion fld[1]; + long hwint[1]; + struct block_symbol block_sym; + struct real_value rv; + } u; +}; +# 347 "../../GCC/gcc/rtl.h" +struct rtvec_def { + int num_elem; + rtx elem[1]; +}; +# 539 "../../GCC/gcc/rtl.h" +extern void rtl_check_failed_bounds (rtx, int, const char *, int, + const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_type1 (rtx, int, int, const char *, int, + const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_type2 (rtx, int, int, int, const char *, + int, const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_code1 (rtx, enum rtx_code, const char *, + int, const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_code2 (rtx, enum rtx_code, enum rtx_code, + const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_code_mode (rtx, enum rtx_code, enum machine_mode, + unsigned char, const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void rtl_check_failed_block_symbol (const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void rtvec_check_failed_bounds (rtvec, int, const char *, int, + const char *) + __attribute__ ((__noreturn__)); +# 793 "../../GCC/gcc/rtl.h" +enum reg_note +{ + +# 1 "../../GCC/gcc/reg-notes.def" 1 +# 32 "../../GCC/gcc/reg-notes.def" +REG_DEP_TRUE, + + + + +REG_DEAD, + + +REG_INC, +# 51 "../../GCC/gcc/reg-notes.def" +REG_EQUIV, + + + + +REG_EQUAL, + + + + + + +REG_RETVAL, + + + + +REG_LIBCALL, + + + + + + +REG_NONNEG, + + + +REG_NO_CONFLICT, + + +REG_UNUSED, +# 91 "../../GCC/gcc/reg-notes.def" +REG_CC_SETTER, +REG_CC_USER, + + + + +REG_LABEL, + + + +REG_DEP_OUTPUT, +REG_DEP_ANTI, + + + + + +REG_BR_PROB, + + + + +REG_VALUE_PROFILE, + + + +REG_NOALIAS, + + + + + +REG_BR_PRED, + + + + +REG_FRAME_RELATED_EXPR, + + + + +REG_EH_CONTEXT, + + + + + +REG_EH_REGION, + + +REG_SAVE_NOTE, + + + + + +REG_MAYBE_DEAD, + + +REG_NORETURN, + + + +REG_NON_LOCAL_GOTO, + + + + +REG_CROSSING_JUMP, + + + +REG_SETJMP, +# 797 "../../GCC/gcc/rtl.h" 2 + + REG_NOTE_MAX +}; +# 808 "../../GCC/gcc/rtl.h" +extern const char * const reg_note_name[]; +# 879 "../../GCC/gcc/rtl.h" +enum insn_note +{ + + NOTE_INSN_BIAS = -100, + + +# 1 "../../GCC/gcc/insn-notes.def" 1 +# 35 "../../GCC/gcc/insn-notes.def" +NOTE_INSN_DELETED, + + +NOTE_INSN_DELETED_LABEL, + + + +NOTE_INSN_BLOCK_BEG, +NOTE_INSN_BLOCK_END, + + +NOTE_INSN_LOOP_BEG, +NOTE_INSN_LOOP_END, + + + + +NOTE_INSN_FUNCTION_BEG, + + + + + + +NOTE_INSN_FUNCTION_END, + + +NOTE_INSN_PROLOGUE_END, + + +NOTE_INSN_EPILOGUE_BEG, + + + +NOTE_INSN_EH_REGION_BEG, +NOTE_INSN_EH_REGION_END, + + + + + +NOTE_INSN_REPEATED_LINE_NUMBER, + + +NOTE_INSN_VAR_LOCATION, + + + +NOTE_INSN_EXPECTED_VALUE, + + + + +NOTE_INSN_BASIC_BLOCK, + + + +NOTE_INSN_SWITCH_TEXT_SECTIONS, +# 886 "../../GCC/gcc/rtl.h" 2 + + + NOTE_INSN_MAX +}; + + + +extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; +# 908 "../../GCC/gcc/rtl.h" +enum label_kind +{ + LABEL_NORMAL = 0, + LABEL_STATIC_ENTRY, + LABEL_GLOBAL_ENTRY, + LABEL_WEAK_ENTRY +}; +# 1032 "../../GCC/gcc/rtl.h" +extern void init_rtlanal (void); +extern int rtx_cost (rtx, enum rtx_code); +extern int address_cost (rtx, enum machine_mode); +extern unsigned int subreg_lsb (rtx); +extern unsigned int subreg_lsb_1 (enum machine_mode, enum machine_mode, + unsigned int); +extern unsigned int subreg_regno_offset (unsigned int, enum machine_mode, + unsigned int, enum machine_mode); +extern unsigned char subreg_offset_representable_p (unsigned int, enum machine_mode, + unsigned int, enum machine_mode); +extern unsigned int subreg_regno (rtx); +extern unsigned long nonzero_bits (rtx, enum machine_mode); +extern unsigned int num_sign_bit_copies (rtx, enum machine_mode); +extern unsigned char constant_pool_constant_p (rtx); +extern unsigned char truncated_to_mode (enum machine_mode, rtx); +# 1425 "../../GCC/gcc/rtl.h" +extern int generating_concat_p; + + +extern int currently_expanding_to_rtl; + + + + +extern int ceil_log2 (unsigned long); + + +extern rtx expand_builtin_expect_jump (tree, rtx, rtx); + + +extern void set_stack_check_libfunc (rtx); +extern long trunc_int_for_mode (long, enum machine_mode); +extern rtx plus_constant (rtx, long); + + +extern rtvec gen_rtvec (int, ...); +extern rtx copy_insn_1 (rtx); +extern rtx copy_insn (rtx); +extern rtx gen_int_mode (long, enum machine_mode); +extern rtx emit_copy_of_insn_after (rtx, rtx); +extern void set_reg_attrs_from_mem (rtx, rtx); +extern void set_mem_attrs_from_reg (rtx, rtx); +extern void set_reg_attrs_for_parm (rtx, rtx); +extern int mem_expr_equal_p (tree, tree); + + +extern rtx rtx_alloc_stat (enum rtx_code ); + + +extern rtvec rtvec_alloc (int); +extern rtx copy_rtx (rtx); +extern void dump_rtx_statistics (void); + + +extern rtx copy_rtx_if_shared (rtx); + + +extern unsigned int rtx_size (rtx); +extern rtx shallow_copy_rtx_stat (rtx ); + +extern int rtx_equal_p (rtx, rtx); + + +extern rtvec gen_rtvec_v (int, rtx *); +extern rtx gen_reg_rtx (enum machine_mode); +extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int); +extern rtx gen_label_rtx (void); +extern rtx gen_lowpart_common (enum machine_mode, rtx); + + +extern rtx gen_lowpart_if_possible (enum machine_mode, rtx); + + +extern rtx gen_highpart (enum machine_mode, rtx); +extern rtx gen_highpart_mode (enum machine_mode, enum machine_mode, rtx); +extern rtx operand_subword (rtx, unsigned int, int, enum machine_mode); + + +extern rtx operand_subword_force (rtx, unsigned int, enum machine_mode); +extern int subreg_lowpart_p (rtx); +extern unsigned int subreg_lowpart_offset (enum machine_mode, + enum machine_mode); +extern unsigned int subreg_highpart_offset (enum machine_mode, + enum machine_mode); +extern rtx make_safe_from (rtx, rtx); +extern rtx convert_memory_address (enum machine_mode, rtx); +extern rtx get_insns (void); +extern const char *get_insn_name (int); +extern rtx get_last_insn (void); +extern rtx get_last_insn_anywhere (void); +extern rtx get_first_nonnote_insn (void); +extern rtx get_last_nonnote_insn (void); +extern void start_sequence (void); +extern void push_to_sequence (rtx); +extern void end_sequence (void); +extern rtx immed_double_const (long, long, + enum machine_mode); + + + +extern rtx lowpart_subreg (enum machine_mode, rtx, enum machine_mode); + + +extern rtx force_const_mem (enum machine_mode, rtx); + + + +struct function; +extern rtx get_pool_constant (rtx); +extern rtx get_pool_constant_mark (rtx, unsigned char *); +extern enum machine_mode get_pool_mode (rtx); +extern rtx simplify_subtraction (rtx); + + +extern rtx assign_stack_local (enum machine_mode, long, int); +extern rtx assign_stack_temp (enum machine_mode, long, int); +extern rtx assign_stack_temp_for_type (enum machine_mode, + long, int, tree); +extern rtx assign_temp (tree, int, int, int); + + +extern rtx emit_insn_before (rtx, rtx); +extern rtx emit_insn_before_noloc (rtx, rtx); +extern rtx emit_insn_before_setloc (rtx, rtx, int); +extern rtx emit_jump_insn_before (rtx, rtx); +extern rtx emit_jump_insn_before_noloc (rtx, rtx); +extern rtx emit_jump_insn_before_setloc (rtx, rtx, int); +extern rtx emit_call_insn_before (rtx, rtx); +extern rtx emit_call_insn_before_noloc (rtx, rtx); +extern rtx emit_call_insn_before_setloc (rtx, rtx, int); +extern rtx emit_barrier_before (rtx); +extern rtx emit_label_before (rtx, rtx); +extern rtx emit_note_before (int, rtx); +extern rtx emit_insn_after (rtx, rtx); +extern rtx emit_insn_after_noloc (rtx, rtx); +extern rtx emit_insn_after_setloc (rtx, rtx, int); +extern rtx emit_jump_insn_after (rtx, rtx); +extern rtx emit_jump_insn_after_noloc (rtx, rtx); +extern rtx emit_jump_insn_after_setloc (rtx, rtx, int); +extern rtx emit_call_insn_after (rtx, rtx); +extern rtx emit_call_insn_after_noloc (rtx, rtx); +extern rtx emit_call_insn_after_setloc (rtx, rtx, int); +extern rtx emit_barrier_after (rtx); +extern rtx emit_label_after (rtx, rtx); +extern rtx emit_note_after (int, rtx); +extern rtx emit_note_copy_after (rtx, rtx); +extern rtx emit_insn (rtx); +extern rtx emit_jump_insn (rtx); +extern rtx emit_call_insn (rtx); +extern rtx emit_label (rtx); +extern rtx emit_barrier (void); +extern rtx emit_note (int); +extern rtx emit_note_copy (rtx); +extern rtx emit_line_note (location_t); +extern rtx make_insn_raw (rtx); +extern rtx make_jump_insn_raw (rtx); +extern void add_function_usage_to (rtx, rtx); +extern rtx last_call_insn (void); +extern rtx previous_insn (rtx); +extern rtx next_insn (rtx); +extern rtx prev_nonnote_insn (rtx); +extern rtx next_nonnote_insn (rtx); +extern rtx prev_real_insn (rtx); +extern rtx next_real_insn (rtx); +extern rtx prev_active_insn (rtx); +extern rtx next_active_insn (rtx); +extern int active_insn_p (rtx); +extern rtx prev_label (rtx); +extern rtx next_label (rtx); +extern rtx skip_consecutive_labels (rtx); +extern rtx next_cc0_user (rtx); +extern rtx prev_cc0_setter (rtx); + + +extern int insn_line (rtx); +extern const char * insn_file (rtx); +extern int locator_line (int); +extern const char * locator_file (int); +extern int prologue_locator, epilogue_locator; + + +extern enum rtx_code reverse_condition (enum rtx_code); +extern enum rtx_code reverse_condition_maybe_unordered (enum rtx_code); +extern enum rtx_code swap_condition (enum rtx_code); +extern enum rtx_code unsigned_condition (enum rtx_code); +extern enum rtx_code signed_condition (enum rtx_code); +extern void mark_jump_label (rtx, rtx, int); +extern unsigned int cleanup_barriers (void); + + +extern unsigned char squeeze_notes (rtx *, rtx *); +extern rtx delete_related_insns (rtx); +extern void delete_jump (rtx); +extern rtx get_label_before (rtx); +extern rtx get_label_after (rtx); +extern rtx follow_jumps (rtx); + + +extern rtx *find_constant_term_loc (rtx *); + + +extern rtx try_split (rtx, rtx, int); +extern int split_branch_probability; + + +extern rtx split_insns (rtx, rtx); + + +extern rtx simplify_const_unary_operation (enum rtx_code, enum machine_mode, + rtx, enum machine_mode); +extern rtx simplify_unary_operation (enum rtx_code, enum machine_mode, rtx, + enum machine_mode); +extern rtx simplify_const_binary_operation (enum rtx_code, enum machine_mode, + rtx, rtx); +extern rtx simplify_binary_operation (enum rtx_code, enum machine_mode, rtx, + rtx); +extern rtx simplify_ternary_operation (enum rtx_code, enum machine_mode, + enum machine_mode, rtx, rtx, rtx); +extern rtx simplify_const_relational_operation (enum rtx_code, + enum machine_mode, rtx, rtx); +extern rtx simplify_relational_operation (enum rtx_code, enum machine_mode, + enum machine_mode, rtx, rtx); +extern rtx simplify_gen_binary (enum rtx_code, enum machine_mode, rtx, rtx); +extern rtx simplify_gen_unary (enum rtx_code, enum machine_mode, rtx, + enum machine_mode); +extern rtx simplify_gen_ternary (enum rtx_code, enum machine_mode, + enum machine_mode, rtx, rtx, rtx); +extern rtx simplify_gen_relational (enum rtx_code, enum machine_mode, + enum machine_mode, rtx, rtx); +extern rtx simplify_subreg (enum machine_mode, rtx, enum machine_mode, + unsigned int); +extern rtx simplify_gen_subreg (enum machine_mode, rtx, enum machine_mode, + unsigned int); +extern rtx simplify_replace_rtx (rtx, rtx, rtx); +extern rtx simplify_rtx (rtx); +extern rtx avoid_constant_pool_reference (rtx); +extern unsigned char constant_pool_reference_p (rtx x); +extern unsigned char mode_signbit_p (enum machine_mode, rtx); + + +extern enum machine_mode choose_hard_reg_mode (unsigned int, unsigned int, + unsigned char); + + +extern rtx set_unique_reg_note (rtx, enum reg_note, rtx); +# 1665 "../../GCC/gcc/rtl.h" +typedef struct replace_label_data +{ + rtx r1; + rtx r2; + unsigned char update_label_nuses; +} replace_label_data; + +extern int rtx_addr_can_trap_p (rtx); +extern unsigned char nonzero_address_p (rtx); +extern int rtx_unstable_p (rtx); +extern int rtx_varies_p (rtx, int); +extern int rtx_addr_varies_p (rtx, int); +extern long get_integer_term (rtx); +extern rtx get_related_value (rtx); +extern int reg_mentioned_p (rtx, rtx); +extern int count_occurrences (rtx, rtx, int); +extern int reg_referenced_p (rtx, rtx); +extern int reg_used_between_p (rtx, rtx, rtx); +extern int reg_set_between_p (rtx, rtx, rtx); +extern int commutative_operand_precedence (rtx); +extern int swap_commutative_operands_p (rtx, rtx); +extern int modified_between_p (rtx, rtx, rtx); +extern int no_labels_between_p (rtx, rtx); +extern int modified_in_p (rtx, rtx); +extern int reg_set_p (rtx, rtx); +extern rtx single_set_2 (rtx, rtx); +extern int multiple_sets (rtx); +extern int set_noop_p (rtx); +extern int noop_move_p (rtx); +extern rtx find_last_value (rtx, rtx *, rtx, int); +extern int refers_to_regno_p (unsigned int, unsigned int, rtx, rtx *); +extern int reg_overlap_mentioned_p (rtx, rtx); +extern rtx set_of (rtx, rtx); +extern void note_stores (rtx, void (*) (rtx, rtx, void *), void *); +extern void note_uses (rtx *, void (*) (rtx *, void *), void *); +extern int dead_or_set_p (rtx, rtx); +extern int dead_or_set_regno_p (rtx, unsigned int); +extern rtx find_reg_note (rtx, enum reg_note, rtx); +extern rtx find_regno_note (rtx, enum reg_note, unsigned int); +extern rtx find_reg_equal_equiv_note (rtx); +extern int find_reg_fusage (rtx, enum rtx_code, rtx); +extern int find_regno_fusage (rtx, enum rtx_code, unsigned int); +extern int pure_call_p (rtx); +extern void remove_note (rtx, rtx); +extern int side_effects_p (rtx); +extern int volatile_refs_p (rtx); +extern int volatile_insn_p (rtx); +extern int may_trap_p (rtx); +extern int may_trap_after_code_motion_p (rtx); +extern int may_trap_or_fault_p (rtx); +extern int inequality_comparisons_p (rtx); +extern rtx replace_rtx (rtx, rtx, rtx); +extern int replace_label (rtx *, void *); +extern int rtx_referenced_p (rtx, rtx); +extern unsigned char tablejump_p (rtx, rtx *, rtx *); +extern int computed_jump_p (rtx); +typedef int (*rtx_function) (rtx *, void *); +extern int for_each_rtx (rtx *, rtx_function, void *); +extern rtx regno_use_in (unsigned int, rtx); +extern int auto_inc_p (rtx); +extern int in_expr_list_p (rtx, rtx); +extern void remove_node_from_expr_list (rtx, rtx *); +extern int loc_mentioned_in_p (rtx *, rtx); +extern rtx find_first_parameter_load (rtx, rtx); +extern unsigned char keep_with_call_p (rtx); +extern unsigned char label_is_jump_target_p (rtx, rtx); +extern int insn_rtx_cost (rtx); + + + +extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int); + + + +extern rtx get_condition (rtx, rtx *, int, int); + + + + +extern rtx find_use_as_address (rtx, rtx, long); + + + +void free_EXPR_LIST_list (rtx *); +void free_INSN_LIST_list (rtx *); +void free_EXPR_LIST_node (rtx); +void free_INSN_LIST_node (rtx); +rtx alloc_INSN_LIST (rtx, rtx); +rtx alloc_EXPR_LIST (int, rtx, rtx); +void free_DEPS_LIST_list (rtx *); +rtx alloc_DEPS_LIST (rtx, rtx, int); +void remove_free_DEPS_LIST_elem (rtx, rtx *); +void remove_free_INSN_LIST_elem (rtx, rtx *); +rtx remove_list_elem (rtx, rtx *); +rtx copy_DEPS_LIST_list (rtx); + + + + + + + +extern int max_parallel; + + +extern void free_reg_info (void); + + +extern int asm_noperands (rtx); +extern const char *decode_asm_operands (rtx, rtx *, rtx **, const char **, + enum machine_mode *); + +extern enum reg_class reg_preferred_class (int); +extern enum reg_class reg_alternate_class (int); + +extern void split_all_insns (int); +extern unsigned int split_all_insns_noflow (void); + + +extern rtx const_int_rtx[64 * 2 + 1]; + + + + + +extern rtx const_true_rtx; + +extern rtx const_tiny_rtx[3][(int) MAX_MACHINE_MODE]; +# 1815 "../../GCC/gcc/rtl.h" +enum global_rtl_index +{ + GR_PC, + GR_CC0, + GR_STACK_POINTER, + GR_FRAME_POINTER, +# 1830 "../../GCC/gcc/rtl.h" + GR_HARD_FRAME_POINTER, + + + + + + GR_ARG_POINTER, + + + GR_VIRTUAL_INCOMING_ARGS, + GR_VIRTUAL_STACK_ARGS, + GR_VIRTUAL_STACK_DYNAMIC, + GR_VIRTUAL_OUTGOING_ARGS, + GR_VIRTUAL_CFA, + + GR_MAX +}; + + +extern rtx global_rtl[GR_MAX]; +# 1863 "../../GCC/gcc/rtl.h" +extern rtx pic_offset_table_rtx; +extern rtx static_chain_rtx; +extern rtx static_chain_incoming_rtx; +extern rtx return_address_pointer_rtx; + + + + +# 1 "./genrtl.h" 1 + + + + + +extern rtx gen_rtx_fmt_ee (enum rtx_code, enum machine_mode mode, + rtx arg0, rtx arg1); +extern rtx gen_rtx_fmt_ue (enum rtx_code, enum machine_mode mode, + rtx arg0, rtx arg1); +extern rtx gen_rtx_fmt_uei (enum rtx_code, enum machine_mode mode, + rtx arg0, rtx arg1, int arg2); +extern rtx gen_rtx_fmt_E (enum rtx_code, enum machine_mode mode, + rtvec arg0); +extern rtx gen_rtx_fmt_e (enum rtx_code, enum machine_mode mode, + rtx arg0); +extern rtx gen_rtx_fmt_iuuBieiee (enum rtx_code, enum machine_mode mode, + int arg0, rtx arg1, rtx arg2, + struct basic_block_def *arg3, + int arg4, rtx arg5, int arg6, + rtx arg7, rtx arg8); +extern rtx gen_rtx_fmt_iuuBieiee0 (enum rtx_code, enum machine_mode mode, + int arg0, rtx arg1, rtx arg2, + struct basic_block_def *arg3, + int arg4, rtx arg5, int arg6, + rtx arg7, rtx arg8); +extern rtx gen_rtx_fmt_iuuBieieee (enum rtx_code, enum machine_mode mode, + int arg0, rtx arg1, rtx arg2, + struct basic_block_def *arg3, + int arg4, rtx arg5, int arg6, + rtx arg7, rtx arg8, rtx arg9); +extern rtx gen_rtx_fmt_iuu000000 (enum rtx_code, enum machine_mode mode, + int arg0, rtx arg1, rtx arg2); +extern rtx gen_rtx_fmt_iuuB00is (enum rtx_code, enum machine_mode mode, + int arg0, rtx arg1, rtx arg2, + struct basic_block_def *arg3, + int arg4, const char *arg5); +extern rtx gen_rtx_fmt_s (enum rtx_code, enum machine_mode mode, + const char *arg0); +extern rtx gen_rtx_fmt_ssiEEsi (enum rtx_code, enum machine_mode mode, + const char *arg0, const char *arg1, + int arg2, rtvec arg3, rtvec arg4, + const char *arg5, int arg6); +extern rtx gen_rtx_fmt_Ei (enum rtx_code, enum machine_mode mode, + rtvec arg0, int arg1); +extern rtx gen_rtx_fmt_eEee0 (enum rtx_code, enum machine_mode mode, + rtx arg0, rtvec arg1, rtx arg2, + rtx arg3); +extern rtx gen_rtx_fmt_eee (enum rtx_code, enum machine_mode mode, + rtx arg0, rtx arg1, rtx arg2); +extern rtx gen_rtx_fmt_ (enum rtx_code, enum machine_mode mode); +extern rtx gen_rtx_fmt_i (enum rtx_code, enum machine_mode mode, + int arg0); +extern rtx gen_rtx_fmt_w (enum rtx_code, enum machine_mode mode, + long arg0); +extern rtx gen_rtx_fmt_0 (enum rtx_code, enum machine_mode mode); +extern rtx gen_rtx_fmt_i00 (enum rtx_code, enum machine_mode mode, + int arg0); +extern rtx gen_rtx_fmt_ei (enum rtx_code, enum machine_mode mode, + rtx arg0, int arg1); +extern rtx gen_rtx_fmt_e0 (enum rtx_code, enum machine_mode mode, + rtx arg0); +extern rtx gen_rtx_fmt_u (enum rtx_code, enum machine_mode mode, + rtx arg0); +extern rtx gen_rtx_fmt_s00 (enum rtx_code, enum machine_mode mode, + const char *arg0); +extern rtx gen_rtx_fmt_te (enum rtx_code, enum machine_mode mode, + union tree_node *arg0, rtx arg1); +extern rtx gen_rtx_fmt_iss (enum rtx_code, enum machine_mode mode, + int arg0, const char *arg1, + const char *arg2); +extern rtx gen_rtx_fmt_is (enum rtx_code, enum machine_mode mode, + int arg0, const char *arg1); +extern rtx gen_rtx_fmt_isE (enum rtx_code, enum machine_mode mode, + int arg0, const char *arg1, + rtvec arg2); +extern rtx gen_rtx_fmt_iE (enum rtx_code, enum machine_mode mode, + int arg0, rtvec arg1); +extern rtx gen_rtx_fmt_ss (enum rtx_code, enum machine_mode mode, + const char *arg0, const char *arg1); +extern rtx gen_rtx_fmt_sEss (enum rtx_code, enum machine_mode mode, + const char *arg0, rtvec arg1, + const char *arg2, const char *arg3); +extern rtx gen_rtx_fmt_eE (enum rtx_code, enum machine_mode mode, + rtx arg0, rtvec arg1); +extern rtx gen_rtx_fmt_Ess (enum rtx_code, enum machine_mode mode, + rtvec arg0, const char *arg1, + const char *arg2); +extern rtx gen_rtx_fmt_ses (enum rtx_code, enum machine_mode mode, + const char *arg0, rtx arg1, + const char *arg2); +extern rtx gen_rtx_fmt_sss (enum rtx_code, enum machine_mode mode, + const char *arg0, const char *arg1, + const char *arg2); +extern rtx gen_rtx_fmt_sse (enum rtx_code, enum machine_mode mode, + const char *arg0, const char *arg1, + rtx arg2); +extern rtx gen_rtx_fmt_sies (enum rtx_code, enum machine_mode mode, + const char *arg0, int arg1, + rtx arg2, const char *arg3); +extern rtx gen_rtx_fmt_sE (enum rtx_code, enum machine_mode mode, + const char *arg0, rtvec arg1); +extern rtx gen_rtx_fmt_ii (enum rtx_code, enum machine_mode mode, + int arg0, int arg1); +extern rtx gen_rtx_fmt_Ee (enum rtx_code, enum machine_mode mode, + rtvec arg0, rtx arg1); +# 1872 "../../GCC/gcc/rtl.h" 2 +# 1883 "../../GCC/gcc/rtl.h" +extern rtx gen_rtx_CONST_INT (enum machine_mode, long); +extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec); +extern rtx gen_raw_REG (enum machine_mode, int); +extern rtx gen_rtx_REG (enum machine_mode, unsigned); +extern rtx gen_rtx_SUBREG (enum machine_mode, rtx, int); +extern rtx gen_rtx_MEM (enum machine_mode, rtx); +# 1956 "../../GCC/gcc/rtl.h" +extern rtx output_constant_def (tree, int); +extern rtx lookup_constant_def (tree); + + + +extern int flow2_completed; + + + + +extern int reload_completed; + + +extern int epilogue_completed; + + + + +extern int reload_in_progress; + + + + +extern int regstack_completed; +# 1988 "../../GCC/gcc/rtl.h" +extern int cse_not_expected; + + + +extern int no_new_pseudos; + + + + + +extern int rtx_to_tree_code (enum rtx_code); + + +extern int delete_trivially_dead_insns (rtx, int); +extern int cse_main (rtx, int); +extern int exp_equiv_p (rtx, rtx, int, unsigned char); +extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, unsigned char); + + +extern int comparison_dominates_p (enum rtx_code, enum rtx_code); +extern int condjump_p (rtx); +extern int any_condjump_p (rtx); +extern int any_uncondjump_p (rtx); +extern rtx pc_set (rtx); +extern rtx condjump_label (rtx); +extern int simplejump_p (rtx); +extern int returnjump_p (rtx); +extern int onlyjump_p (rtx); +extern int only_sets_cc0_p (rtx); +extern int sets_cc0_p (rtx); +extern int invert_jump_1 (rtx, rtx); +extern int invert_jump (rtx, rtx, int); +extern int rtx_renumbered_equal_p (rtx, rtx); +extern int true_regnum (rtx); +extern unsigned int reg_or_subregno (rtx); +extern int redirect_jump_1 (rtx, rtx); +extern void redirect_jump_2 (rtx, rtx, rtx, int, int); +extern int redirect_jump (rtx, rtx, int); +extern void rebuild_jump_labels (rtx); +extern rtx reversed_comparison (rtx, enum machine_mode); +extern enum rtx_code reversed_comparison_code (rtx, rtx); +extern enum rtx_code reversed_comparison_code_parts (enum rtx_code, + rtx, rtx, rtx); +extern void delete_for_peephole (rtx, rtx); +extern int condjump_in_parallel_p (rtx); +extern unsigned int purge_line_number_notes (void); + + +extern int max_reg_num (void); +extern int max_label_num (void); +extern int get_first_label_num (void); +extern void maybe_set_first_label_num (rtx); +extern void delete_insns_since (rtx); +extern void mark_reg_pointer (rtx, int); +extern void mark_user_reg (rtx); +extern void reset_used_flags (rtx); +extern void set_used_flags (rtx); +extern void reorder_insns (rtx, rtx, rtx); +extern void reorder_insns_nobb (rtx, rtx, rtx); +extern int get_max_uid (void); +extern int in_sequence_p (void); +extern void force_next_line_note (void); +extern void init_emit (void); +extern void init_emit_once (int); +extern void push_topmost_sequence (void); +extern void pop_topmost_sequence (void); +extern void set_new_first_and_last_insn (rtx, rtx); +extern unsigned int unshare_all_rtl (void); +extern void unshare_all_rtl_again (rtx); +extern void unshare_all_rtl_in_chain (rtx); +extern void verify_rtl_sharing (void); +extern void set_first_insn (rtx); +extern void set_last_insn (rtx); +extern void link_cc0_insns (rtx); +extern void add_insn (rtx); +extern void add_insn_before (rtx, rtx); +extern void add_insn_after (rtx, rtx); +extern void remove_insn (rtx); +extern void emit_insn_after_with_line_notes (rtx, rtx, rtx); +extern rtx emit (rtx); +extern void renumber_insns (void); +extern rtx delete_insn (rtx); +extern rtx entry_of_function (void); +extern void emit_insn_at_entry (rtx); +extern void delete_insn_chain (rtx, rtx); +extern rtx unlink_insn_chain (rtx, rtx); +extern rtx delete_insn_and_edges (rtx); +extern void delete_insn_chain_and_edges (rtx, rtx); +extern rtx gen_lowpart_SUBREG (enum machine_mode, rtx); +extern rtx gen_const_mem (enum machine_mode, rtx); +extern rtx gen_frame_mem (enum machine_mode, rtx); +extern rtx gen_tmp_stack_mem (enum machine_mode, rtx); +extern unsigned char validate_subreg (enum machine_mode, enum machine_mode, + rtx, unsigned int); + + +extern unsigned int extended_count (rtx, enum machine_mode, int); +extern rtx remove_death (unsigned int, rtx); +extern void dump_combine_stats (FILE *); +extern void dump_combine_total_stats (FILE *); + + +extern void print_rtl_slim_with_bb (FILE *, rtx, int); +extern void dump_insn_slim (FILE *f, rtx x); +extern void debug_insn_slim (rtx x); + + +extern void schedule_insns (void); + + +extern void schedule_ebbs (void); + + +extern void fix_sched_param (const char *, const char *); + + +extern const char *print_rtx_head; +extern void debug_rtx (rtx); +extern void debug_rtx_list (rtx, int); +extern void debug_rtx_range (rtx, rtx); +extern rtx debug_rtx_find (rtx, int); +extern void print_mem_expr (FILE *, tree); +extern void print_rtl (FILE *, rtx); +extern void print_simple_rtl (FILE *, rtx); +extern int print_rtl_single (FILE *, rtx); +extern void print_inline_rtx (FILE *, rtx, int); + + +extern void branch_target_load_optimize (unsigned char); + + +extern void reposition_prologue_and_epilogue_notes (rtx); +extern void thread_prologue_and_epilogue_insns (rtx); +extern int prologue_epilogue_contains (rtx); +extern int sibcall_epilogue_contains (rtx); +extern void mark_temp_addr_taken (rtx); +extern void update_temp_slot_address (rtx, rtx); + + +extern void expand_null_return (void); +extern void expand_naked_return (void); +extern void emit_jump (rtx); + + +extern rtx move_by_pieces (rtx, rtx, unsigned long, + unsigned int, int); + + +extern void delete_dead_jumptables (void); +extern void print_rtl_with_bb (FILE *, rtx); +extern void dump_flow_info (FILE *, int); + + +extern void init_expmed (void); +extern void expand_inc (rtx, rtx); +extern void expand_dec (rtx, rtx); + + +extern unsigned char can_copy_p (enum machine_mode); +extern rtx fis_get_condition (rtx); + + +extern void mark_elimination (int, int); +extern void dump_global_regs (FILE *); + + + + +extern void build_insn_chain (rtx); + + +extern int reg_classes_intersect_p (enum reg_class, enum reg_class); +extern int reg_class_subset_p (enum reg_class, enum reg_class); +extern void globalize_reg (int); +extern void init_reg_modes_once (void); +extern void init_regs (void); +extern void init_fake_stack_mems (void); +extern void init_reg_sets (void); +extern void regclass_init (void); +extern void regclass (rtx, int); +extern void reg_scan (rtx, unsigned int); +extern void fix_register (const char *, int, int); +extern void init_subregs_of_mode (void); +extern void record_subregs_of_mode (rtx); + + + + +extern unsigned char invalid_mode_change_p (unsigned int, enum reg_class, + enum machine_mode); + + +extern void dbr_schedule (rtx); + + +extern void dump_local_alloc (FILE *); + + +extern int function_invariant_p (rtx); + + +enum libcall_type +{ + LCT_NORMAL = 0, + LCT_CONST = 1, + LCT_PURE = 2, + LCT_CONST_MAKE_BLOCK = 3, + LCT_PURE_MAKE_BLOCK = 4, + LCT_NORETURN = 5, + LCT_THROW = 6, + LCT_RETURNS_TWICE = 7 +}; + +extern void emit_library_call (rtx, enum libcall_type, enum machine_mode, int, + ...); +extern rtx emit_library_call_value (rtx, rtx, enum libcall_type, + enum machine_mode, int, ...); + + +extern void init_varasm_once (void); +extern enum tls_model decl_default_tls_model (tree); + + +extern void traverse_md_constants (int (*) (void **, void *), void *); +struct md_constant { char *name, *value; }; + + +extern int read_skip_spaces (FILE *); +extern unsigned char read_rtx (FILE *, rtx *, int *); +extern void copy_rtx_ptr_loc (const void *, const void *); +extern void print_rtx_ptr_loc (const void *); +extern const char *join_c_conditions (const char *, const char *); +extern void print_c_condition (const char *); +extern const char *read_rtx_filename; +extern int read_rtx_lineno; + + +extern void clear_reg_alias_info (rtx); +extern rtx canon_rtx (rtx); +extern int true_dependence (rtx, enum machine_mode, rtx, int (*)(rtx, int)); +extern rtx get_addr (rtx); +extern int canon_true_dependence (rtx, enum machine_mode, rtx, rtx, + int (*)(rtx, int)); +extern int read_dependence (rtx, rtx); +extern int anti_dependence (rtx, rtx); +extern int output_dependence (rtx, rtx); +extern void init_alias_once (void); +extern void init_alias_analysis (void); +extern void end_alias_analysis (void); +extern unsigned char memory_modified_in_insn_p (rtx, rtx); +extern rtx find_base_term (rtx); +extern rtx gen_hard_reg_clobber (enum machine_mode, unsigned int); +extern rtx get_reg_known_value (unsigned int); +extern unsigned char get_reg_known_equiv_p (unsigned int); + + +extern int stack_regs_mentioned (rtx insn); + + + +extern rtx stack_limit_rtx; + + +extern void invert_br_probabilities (rtx); +extern unsigned char expensive_function_p (int); + +extern void tracer (unsigned int); + + +extern unsigned int variable_tracking_main (void); + + +extern void get_mode_bounds (enum machine_mode, int, enum machine_mode, + rtx *, rtx *); + + +extern rtx reversed_condition (rtx); +extern rtx compare_and_jump_seq (rtx, rtx, enum rtx_code, rtx, int, rtx); + + +extern rtx canon_condition (rtx); +extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *); + +struct rtl_hooks +{ + rtx (*gen_lowpart) (enum machine_mode, rtx); + rtx (*gen_lowpart_no_emit) (enum machine_mode, rtx); + rtx (*reg_nonzero_bits) (rtx, enum machine_mode, rtx, enum machine_mode, + unsigned long, unsigned long *); + rtx (*reg_num_sign_bit_copies) (rtx, enum machine_mode, rtx, enum machine_mode, + unsigned int, unsigned int *); + unsigned char (*reg_truncated_to_mode) (enum machine_mode, rtx); + + +}; + + +extern struct rtl_hooks rtl_hooks; + + +extern const struct rtl_hooks general_rtl_hooks; +# 45 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/langhooks.h" 1 +# 26 "../../GCC/gcc/langhooks.h" +struct diagnostic_context; + +struct gimplify_omp_ctx; + + +typedef void (*lang_print_tree_hook) (FILE *, tree, int indent); + + + + +struct lang_hooks_for_tree_inlining +{ + tree (*walk_subtrees) (tree *, int *, + tree (*) (tree *, int *, void *), + void *, struct pointer_set_t*); + int (*cannot_inline_tree_fn) (tree *); + int (*disregard_inline_limits) (tree); + tree (*add_pending_fn_decls) (void *, tree); + int (*auto_var_in_fn_p) (tree, tree); + int (*anon_aggr_type_p) (tree); + unsigned char (*var_mod_type_p) (tree, tree); + int (*start_inlining) (tree); + void (*end_inlining) (tree); + tree (*convert_parm_for_inlining) (tree, tree, tree, int); +}; + +struct lang_hooks_for_callgraph +{ + + + tree (*analyze_expr) (tree *, int *, tree); + + + void (*expand_function) (tree); +}; + + + +struct lang_hooks_for_functions +{ + + void (*init) (struct function *); + + + void (*final) (struct function *); + + + void (*enter_nested) (struct function *); + + + void (*leave_nested) (struct function *); + + + unsigned char (*missing_noreturn_ok_p) (tree); +}; + + + +struct lang_hooks_for_tree_dump +{ + + + unsigned char (*dump_tree) (void *, tree); + + + int (*type_quals) (tree); +}; + + + +struct lang_hooks_for_types +{ + + + tree (*make_type) (enum tree_code); + + + + tree (*type_for_mode) (enum machine_mode, int); + + + + tree (*type_for_size) (unsigned, int); + + + + tree (*unsigned_type) (tree); + + + + tree (*signed_type) (tree); + + + + tree (*signed_or_unsigned_type) (int, tree); + + + + + + tree (*type_promotes_to) (tree); +# 135 "../../GCC/gcc/langhooks.h" + void (*register_builtin_type) (tree, const char *); + + + + + + void (*incomplete_type_error) (tree value, tree type); + + + + tree (*max_size) (tree); + + + + void (*omp_firstprivatize_type_sizes) (struct gimplify_omp_ctx *, tree); + + + + + unsigned char hash_types; +}; + + + +struct lang_hooks_for_decls +{ + + + int (*global_bindings_p) (void); + + + + + void (*insert_block) (tree); + + + + + + tree (*pushdecl) (tree); + + + tree (*getdecls) (void); + + + + unsigned char (*warn_unused_global) (tree); + + + + void (*final_write_globals) (void); + + + void (*prepare_assemble_variable) (tree); + + + unsigned char (*ok_for_sibcall) (tree); +# 200 "../../GCC/gcc/langhooks.h" + const char * (*comdat_group) (tree); + + + + unsigned char (*omp_privatize_by_reference) (tree); + + + + enum omp_clause_default_kind (*omp_predetermined_sharing) (tree); + + + + + + unsigned char (*omp_disregard_value_expr) (tree, unsigned char); + + + + unsigned char (*omp_private_debug_clause) (tree, unsigned char); + + + + tree (*omp_clause_default_ctor) (tree clause, tree decl); + + + tree (*omp_clause_copy_ctor) (tree clause, tree dst, tree src); + + + tree (*omp_clause_assign_op) (tree clause, tree dst, tree src); + + + + tree (*omp_clause_dtor) (tree clause, tree decl); +}; + + + +struct lang_hooks +{ + + const char *name; + + + + size_t identifier_size; + + + + + + size_t (*tree_size) (enum tree_code); + + + + + unsigned int (*init_options) (unsigned int argc, const char **argv); + + + + void (*initialize_diagnostics) (struct diagnostic_context *); +# 270 "../../GCC/gcc/langhooks.h" + int (*handle_option) (size_t code, const char *arg, int value); + + + + unsigned char (*missing_argument) (const char *opt, size_t code); +# 284 "../../GCC/gcc/langhooks.h" + unsigned char (*post_options) (const char **); + + + + + unsigned char (*init) (void); + + + void (*finish) (void); + + + + void (*parse_file) (int); + + + void (*clear_binding_stack) (void); + + + + long (*get_alias_set) (tree); + + + + + tree (*expand_constant) (tree); + + + + rtx (*expand_expr) (tree, rtx, enum machine_mode, int, rtx *); + + + + int (*expand_decl) (tree); +# 325 "../../GCC/gcc/langhooks.h" + int (*safe_from_p) (rtx, tree); + + + + void (*finish_incomplete_decl) (tree); + + + + + unsigned char (*mark_addressable) (tree); + + + tree (*staticp) (tree); + + + + void (*dup_lang_specific_decl) (tree); + + + + + + + void (*set_decl_assembler_name) (tree); + + + + unsigned char (*can_use_bit_fields_p) (void); + + + + unsigned char reduce_bit_field_operations; + + + + + unsigned char no_body_blocks; + + + + void (*print_statistics) (void); + + + + lang_print_tree_hook print_xnode; + + + + lang_print_tree_hook print_decl; + lang_print_tree_hook print_type; + lang_print_tree_hook print_identifier; + + + + + + + + const char *(*decl_printable_name) (tree decl, int verbosity); + + + + + const char *(*dwarf_name) (tree, int verbosity); + + + + + int (*types_compatible_p) (tree x, tree y); + + + tree (*lang_get_callee_fndecl) (tree); + + + void (*print_error_function) (struct diagnostic_context *, const char *); + + + + + + tree (*expr_size) (tree); +# 414 "../../GCC/gcc/langhooks.h" + long (*to_target_charset) (long); + + + + + + + const struct attribute_spec *attribute_table; + const struct attribute_spec *common_attribute_table; + const struct attribute_spec *format_attribute_table; + + + struct lang_hooks_for_functions function; + + struct lang_hooks_for_tree_inlining tree_inlining; + + struct lang_hooks_for_callgraph callgraph; + + struct lang_hooks_for_tree_dump tree_dump; + + struct lang_hooks_for_decls decls; + + struct lang_hooks_for_types types; + + + + int (*gimplify_expr) (tree *, tree *, tree *); + + + + tree (*fold_obj_type_ref) (tree, tree); +# 454 "../../GCC/gcc/langhooks.h" + tree (*builtin_function) (const char *name, tree type, int function_code, + enum built_in_class bt_class, + const char *library_name, tree attrs); + + + void (*init_ts) (void); + + + + + + tree (*expr_to_decl) (tree expr, unsigned char *tc, unsigned char *ti, unsigned char *se); + + + +}; + + +extern const struct lang_hooks lang_hooks; +# 46 "../../GCC/gcc/c-parser.c" 2 + +# 1 "../../GCC/gcc/../libcpp/include/cpplib.h" 1 +# 28 "../../GCC/gcc/../libcpp/include/cpplib.h" +# 1 "../../GCC/gcc/../libcpp/include/symtab.h" 1 +# 29 "../../GCC/gcc/../libcpp/include/cpplib.h" 2 +# 1 "../../GCC/gcc/../libcpp/include/line-map.h" 1 +# 30 "../../GCC/gcc/../libcpp/include/cpplib.h" 2 + + + + + +typedef struct cpp_reader cpp_reader; +typedef struct cpp_buffer cpp_buffer; +typedef struct cpp_options cpp_options; +typedef struct cpp_token cpp_token; +typedef struct cpp_string cpp_string; +typedef struct cpp_hashnode cpp_hashnode; +typedef struct cpp_macro cpp_macro; +typedef struct cpp_callbacks cpp_callbacks; +typedef struct cpp_dir cpp_dir; + +struct answer; +struct _cpp_file; +# 142 "../../GCC/gcc/../libcpp/include/cpplib.h" +enum cpp_ttype +{ + CPP_EQ, CPP_NOT, CPP_GREATER, CPP_LESS, CPP_PLUS, CPP_MINUS, CPP_MULT, CPP_DIV, CPP_MOD, CPP_AND, CPP_OR, CPP_XOR, CPP_RSHIFT, CPP_LSHIFT, CPP_COMPL, CPP_AND_AND, CPP_OR_OR, CPP_QUERY, CPP_COLON, CPP_COMMA, CPP_OPEN_PAREN, CPP_CLOSE_PAREN, CPP_EOF, CPP_EQ_EQ, CPP_NOT_EQ, CPP_GREATER_EQ, CPP_LESS_EQ, CPP_PLUS_EQ, CPP_MINUS_EQ, CPP_MULT_EQ, CPP_DIV_EQ, CPP_MOD_EQ, CPP_AND_EQ, CPP_OR_EQ, CPP_XOR_EQ, CPP_RSHIFT_EQ, CPP_LSHIFT_EQ, CPP_HASH, CPP_PASTE, CPP_OPEN_SQUARE, CPP_CLOSE_SQUARE, CPP_OPEN_BRACE, CPP_CLOSE_BRACE, CPP_SEMICOLON, CPP_ELLIPSIS, CPP_PLUS_PLUS, CPP_MINUS_MINUS, CPP_DEREF, CPP_DOT, CPP_SCOPE, CPP_DEREF_STAR, CPP_DOT_STAR, CPP_ATSIGN, CPP_NAME, CPP_AT_NAME, CPP_NUMBER, CPP_CHAR, CPP_WCHAR, CPP_OTHER, CPP_STRING, CPP_WSTRING, CPP_OBJC_STRING, CPP_HEADER_NAME, CPP_COMMENT, CPP_MACRO_ARG, CPP_PRAGMA, CPP_PRAGMA_EOL, CPP_PADDING, + N_TTYPES, + + + CPP_LAST_EQ = CPP_LSHIFT, + CPP_FIRST_DIGRAPH = CPP_HASH, + CPP_LAST_PUNCTUATOR= CPP_ATSIGN, + CPP_LAST_CPP_OP = CPP_LESS_EQ +}; + + + + +enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_STDC89, CLK_STDC94, CLK_STDC99, + CLK_GNUCXX, CLK_CXX98, CLK_ASM}; + + +struct cpp_string +{ + unsigned int len; + const unsigned char *text; +}; +# 180 "../../GCC/gcc/../libcpp/include/cpplib.h" +enum cpp_token_fld_kind { + CPP_TOKEN_FLD_NODE, + CPP_TOKEN_FLD_SOURCE, + CPP_TOKEN_FLD_STR, + CPP_TOKEN_FLD_ARG_NO, + CPP_TOKEN_FLD_PRAGMA, + CPP_TOKEN_FLD_NONE +}; + + + +struct cpp_token +{ + source_location src_loc; + __extension__ enum cpp_ttype type : 8; + unsigned char flags; + + union cpp_token_u + { + + cpp_hashnode * + + + + + node; + + + cpp_token * source; + + + struct cpp_string str; + + + unsigned int arg_no; + + + unsigned int pragma; + } val; +}; + + +extern enum cpp_token_fld_kind cpp_token_val_index (cpp_token *tok); +# 239 "../../GCC/gcc/../libcpp/include/cpplib.h" +typedef unsigned int cppchar_t; +typedef int cppchar_signed_t; + + +enum cpp_deps_style { DEPS_NONE = 0, DEPS_USER, DEPS_SYSTEM }; + + +enum cpp_normalize_level { + + normalized_KC = 0, + + normalized_C, + + + normalized_identifier_C, + + normalized_none +}; + + + +struct cpp_options +{ + + unsigned int tabstop; + + + enum c_lang lang; + + + unsigned char cplusplus; + + + unsigned char cplusplus_comments; + + + + unsigned char objc; + + + unsigned char discard_comments; + + + + unsigned char discard_comments_in_macro_exp; + + + unsigned char trigraphs; + + + unsigned char digraphs; + + + unsigned char extended_numbers; + + + unsigned char print_include_names; + + + unsigned char pedantic_errors; + + + unsigned char inhibit_warnings; + + + unsigned char warn_deprecated; + + + unsigned char warn_system_headers; + + + + unsigned char inhibit_errors; + + + unsigned char warn_comments; + + + + unsigned char warn_missing_include_dirs; + + + unsigned char warn_trigraphs; + + + unsigned char warn_multichar; + + + + unsigned char warn_traditional; + + + unsigned char warn_long_long; + + + unsigned char warn_endif_labels; + + + + unsigned char warn_num_sign_change; + + + + unsigned char warn_variadic_macros; + + + unsigned char warnings_are_errors; + + + + unsigned char remap; + + + unsigned char dollars_in_ident; + + + unsigned char extended_identifiers; + + + + unsigned char warn_dollars; + + + unsigned char warn_undef; + + + unsigned char warn_unused_macros; + + + unsigned char c99; + + + unsigned char std; + + + unsigned char pedantic; + + + + unsigned char preprocessed; + + + unsigned char show_column; + + + unsigned char operator_names; + + + unsigned char traditional; + + + const char *narrow_charset; + + + const char *wide_charset; + + + const char *input_charset; + + + + enum cpp_normalize_level warn_normalize; + + + unsigned char warn_invalid_pch; + + + unsigned char restore_pch_deps; + + + struct + { + + enum cpp_deps_style style; + + + unsigned char missing_files; + + + + unsigned char phony_targets; + + + unsigned char ignore_main_file; + } deps; + + + + + + size_t precision, char_precision, int_precision, wchar_precision; + + + unsigned char unsigned_char, unsigned_wchar; + + + + unsigned char bytes_big_endian; + + + unsigned char stdc_0_in_system_headers; + + + unsigned char client_diagnostic; +}; + + + + + + + +typedef const char *(*missing_header_cb)(cpp_reader *, const char *header, cpp_dir **); + + +struct cpp_callbacks +{ + + void (*line_change) (cpp_reader *, const cpp_token *, int); + + + + + + void (*file_change) (cpp_reader *, const struct line_map *); + + void (*dir_change) (cpp_reader *, const char *); + void (*include) (cpp_reader *, unsigned int, const unsigned char *, + const char *, int, const cpp_token **); + void (*define) (cpp_reader *, unsigned int, cpp_hashnode *); + void (*undef) (cpp_reader *, unsigned int, cpp_hashnode *); + void (*ident) (cpp_reader *, unsigned int, const cpp_string *); + void (*def_pragma) (cpp_reader *, unsigned int); + int (*valid_pch) (cpp_reader *, const char *, int); + void (*read_pch) (cpp_reader *, const char *, int, const char *); + missing_header_cb missing_header; + + + + void (*error) (cpp_reader *, int, const char *, va_list *) + __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__nonnull__ (3))); +}; + + +struct cpp_dir +{ + + struct cpp_dir *next; + + + char *name; + unsigned int len; + + + + unsigned char sysp; + + + + const char **name_map; + + + + + + char *(*construct) (const char *header, cpp_dir *dir); + + + + ino_t ino; + dev_t dev; + + + unsigned char user_supplied_p; +}; + + +extern const char *progname; +# 539 "../../GCC/gcc/../libcpp/include/cpplib.h" +enum node_type +{ + NT_VOID = 0, + NT_MACRO, + NT_ASSERTION +}; + + + +enum builtin_type +{ + BT_SPECLINE = 0, + BT_DATE, + BT_FILE, + BT_BASE_FILE, + BT_INCLUDE_LEVEL, + BT_TIME, + BT_STDC, + BT_PRAGMA, + BT_TIMESTAMP +}; +# 568 "../../GCC/gcc/../libcpp/include/cpplib.h" +enum { + NTV_MACRO, + NTV_ANSWER, + NTV_BUILTIN, + NTV_ARGUMENT, + NTV_NONE +}; +# 587 "../../GCC/gcc/../libcpp/include/cpplib.h" +union _cpp_hashnode_value +{ + + cpp_macro * macro; + + struct answer * answers; + + enum builtin_type builtin; + + unsigned short arg_index; +}; + +struct cpp_hashnode +{ + struct ht_identifier ident; + unsigned int is_directive : 1; + unsigned int directive_index : 7; + + + unsigned char rid_code; + __extension__ enum node_type type : 8; + unsigned char flags; + + union _cpp_hashnode_value value; +}; + + + + + + + +extern cpp_reader *cpp_create_reader (enum c_lang, struct ht *, + struct line_maps *); + + + +extern void cpp_set_lang (cpp_reader *, enum c_lang); + + +extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); + + + + + + +extern cpp_options *cpp_get_options (cpp_reader *); +extern cpp_callbacks *cpp_get_callbacks (cpp_reader *); +extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *); +extern struct deps *cpp_get_deps (cpp_reader *); + + + + + + +extern const char *cpp_read_main_file (cpp_reader *, const char *); + + +extern void cpp_init_builtins (cpp_reader *, int); + + + +extern void cpp_post_options (cpp_reader *); + + +extern void cpp_init_iconv (cpp_reader *); + + + + + + +extern int cpp_finish (cpp_reader *, FILE *deps_stream); + + + + +extern void cpp_destroy (cpp_reader *); + + +extern unsigned int cpp_errors (cpp_reader *); + +extern unsigned int cpp_token_len (const cpp_token *); +extern unsigned char *cpp_token_as_text (cpp_reader *, const cpp_token *); +extern unsigned char *cpp_spell_token (cpp_reader *, const cpp_token *, + unsigned char *, unsigned char); +extern void cpp_register_pragma (cpp_reader *, const char *, const char *, + void (*) (cpp_reader *), unsigned char); +extern void cpp_register_deferred_pragma (cpp_reader *, const char *, + const char *, unsigned, unsigned char, unsigned char); +extern int cpp_avoid_paste (cpp_reader *, const cpp_token *, + const cpp_token *); +extern const cpp_token *cpp_get_token (cpp_reader *); +extern const unsigned char *cpp_macro_definition (cpp_reader *, + const cpp_hashnode *); +extern void _cpp_backup_tokens (cpp_reader *, unsigned int); + + +extern cppchar_t cpp_interpret_charconst (cpp_reader *, const cpp_token *, + unsigned int *, int *); + +extern unsigned char cpp_interpret_string (cpp_reader *, + const cpp_string *, size_t, + cpp_string *, unsigned char); +extern unsigned char cpp_interpret_string_notranslate (cpp_reader *, + const cpp_string *, size_t, + cpp_string *, unsigned char); + + +extern cppchar_t cpp_host_to_exec_charset (cpp_reader *, cppchar_t); + + + +extern void cpp_define (cpp_reader *, const char *); +extern void cpp_assert (cpp_reader *, const char *); +extern void cpp_undef (cpp_reader *, const char *); +extern void cpp_unassert (cpp_reader *, const char *); + + +extern void cpp_undef_all (cpp_reader *); + +extern cpp_buffer *cpp_push_buffer (cpp_reader *, const unsigned char *, + size_t, int); +extern int cpp_defined (cpp_reader *, const unsigned char *, int); + + + +typedef unsigned long cpp_num_part; +typedef struct cpp_num cpp_num; +struct cpp_num +{ + cpp_num_part high; + cpp_num_part low; + unsigned char unsignedp; + unsigned char overflow; +}; +# 754 "../../GCC/gcc/../libcpp/include/cpplib.h" +extern unsigned cpp_classify_number (cpp_reader *, const cpp_token *); + + +extern cpp_num cpp_interpret_integer (cpp_reader *, const cpp_token *, + unsigned int type); + + + +cpp_num cpp_num_sign_extend (cpp_num, size_t); +# 786 "../../GCC/gcc/../libcpp/include/cpplib.h" +extern void cpp_error (cpp_reader *, int, const char *msgid, ...) + __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__nonnull__ (3))); + + + +extern void cpp_errno (cpp_reader *, int, const char *msgid); + + + + +extern void cpp_error_with_line (cpp_reader *, int, source_location, unsigned, + const char *msgid, ...) __attribute__ ((__format__ (__printf__, 5, 6))) __attribute__ ((__nonnull__ (5))); + + +extern int cpp_ideq (const cpp_token *, const char *); +extern void cpp_output_line (cpp_reader *, FILE *); +extern void cpp_output_token (const cpp_token *, FILE *); +extern const char *cpp_type2name (enum cpp_ttype); + + + + + +extern cppchar_t cpp_parse_escape (cpp_reader *, const unsigned char ** pstr, + const unsigned char *limit, int wide); + + + + + +extern cpp_hashnode *cpp_lookup (cpp_reader *, const unsigned char *, + unsigned int); + +typedef int (*cpp_cb) (cpp_reader *, cpp_hashnode *, void *); +extern void cpp_forall_identifiers (cpp_reader *, cpp_cb, void *); + + +extern void cpp_scan_nooutput (cpp_reader *); +extern int cpp_sys_macro_p (cpp_reader *); +extern unsigned char *cpp_quote_string (unsigned char *, const unsigned char *, + unsigned int); + + +extern unsigned char cpp_included (cpp_reader *, const char *); +extern void cpp_make_system_header (cpp_reader *, int, int); +extern unsigned char cpp_push_include (cpp_reader *, const char *); +extern void cpp_change_file (cpp_reader *, enum lc_reason, const char *); +extern const char *cpp_get_path (struct _cpp_file *); +extern cpp_dir *cpp_get_dir (struct _cpp_file *); +extern cpp_buffer *cpp_get_buffer (cpp_reader *); +extern struct _cpp_file *cpp_get_file (cpp_buffer *); +extern cpp_buffer *cpp_get_prev (cpp_buffer *); + + +struct save_macro_data; +extern int cpp_save_state (cpp_reader *, FILE *); +extern int cpp_write_pch_deps (cpp_reader *, FILE *); +extern int cpp_write_pch_state (cpp_reader *, FILE *); +extern int cpp_valid_state (cpp_reader *, const char *, int); +extern void cpp_prepare_state (cpp_reader *, struct save_macro_data **); +extern int cpp_read_state (cpp_reader *, const char *, FILE *, + struct save_macro_data *); +# 48 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/timevar.h" 1 +# 52 "../../GCC/gcc/timevar.h" +struct timevar_time_def +{ + + double user; + + + + double sys; + + + double wall; + + + unsigned ggc_mem; +}; + + + + + + +typedef enum +{ +# 1 "../../GCC/gcc/timevar.def" 1 +# 34 "../../GCC/gcc/timevar.def" +TV_TOTAL, + + +TV_GC, + + +TV_DUMP, + +TV_CGRAPH, +TV_CGRAPHOPT, +TV_IPA_CONSTANT_PROP, +TV_IPA_REFERENCE, +TV_IPA_PURE_CONST, +TV_IPA_TYPE_ESCAPE, +TV_IPA_PTA, + +TV_CFG, + +TV_CLEANUP_CFG, +TV_CFG_VERIFY, +TV_DELETE_TRIVIALLY_DEAD, + +TV_LIFE, +TV_LIFE_UPDATE, + +TV_ALIAS_ANALYSIS, +TV_REG_SCAN, +TV_REBUILD_JUMP, + +TV_CPP, +TV_LEX, +TV_PARSE, +TV_NAME_LOOKUP, +TV_INLINE_HEURISTICS, +TV_INTEGRATION, +TV_TREE_GIMPLIFY, +TV_TREE_EH, +TV_TREE_CFG, +TV_TREE_CLEANUP_CFG, +TV_TREE_VRP, +TV_TREE_COPY_PROP, +TV_TREE_STORE_COPY_PROP, +TV_FIND_REFERENCED_VARS, +TV_TREE_PTA, +TV_TREE_MAY_ALIAS, +TV_TREE_INSERT_PHI_NODES, +TV_TREE_SSA_REWRITE_BLOCKS, +TV_TREE_SSA_OTHER, +TV_TREE_SSA_INCREMENTAL, +TV_TREE_OPS, +TV_TREE_SSA_DOMINATOR_OPTS, +TV_TREE_SRA, +TV_TREE_STORE_CCP, +TV_TREE_CCP, +TV_TREE_PHI_CPROP, +TV_TREE_SPLIT_EDGES, +TV_TREE_REASSOC, +TV_TREE_PRE, +TV_TREE_REDPHI, +TV_TREE_FRE, +TV_TREE_SINK, +TV_TREE_PHIOPT, +TV_TREE_FORWPROP, +TV_TREE_DCE, +TV_TREE_CD_DCE, +TV_TREE_DSE, +TV_TREE_MERGE_PHI, +TV_TREE_LOOP, +TV_TREE_LOOP_BOUNDS, +TV_LIM, +TV_TREE_LOOP_IVCANON, +TV_SCEV_CONST, +TV_TREE_LOOP_UNSWITCH, +TV_COMPLETE_UNROLL, +TV_TREE_VECTORIZATION, +TV_TREE_LINEAR_TRANSFORM, +TV_TREE_PREFETCH, +TV_TREE_LOOP_IVOPTS, +TV_TREE_LOOP_INIT, +TV_TREE_LOOP_FINI, +TV_TREE_CH, +TV_TREE_SSA_UNCPROP, +TV_TREE_SSA_TO_NORMAL, +TV_TREE_NRV, +TV_TREE_COPY_RENAME, +TV_TREE_SSA_VERIFY, +TV_TREE_STMT_VERIFY, +TV_CGRAPH_VERIFY, +TV_DOM_FRONTIERS, +TV_DOMINANCE, +TV_CONTROL_DEPENDENCES, +TV_OVERLOAD, +TV_TEMPLATE_INSTANTIATION, +TV_EXPAND, +TV_VARCONST, +TV_JUMP, +TV_CSE, +TV_LOOP, +TV_GCSE, +TV_CPROP1, +TV_PRE, +TV_HOIST, +TV_CPROP2, +TV_LSM, +TV_BYPASS, +TV_TRACER, +TV_WEB, +TV_CSE2, +TV_BRANCH_PROB, +TV_VPT, +TV_FLOW, +TV_COMBINE, +TV_IFCVT, +TV_SEE, +TV_REGMOVE, +TV_MODE_SWITCH, +TV_SMS, +TV_SCHED, +TV_LOCAL_ALLOC, +TV_GLOBAL_ALLOC, +TV_RELOAD_CSE_REGS, +TV_SEQABSTR, +TV_GCSE_AFTER_RELOAD, +TV_FLOW2, +TV_IFCVT2, +TV_PEEPHOLE2, +TV_RENAME_REGISTERS, +TV_SCHED2, +TV_MACH_DEP, +TV_DBR_SCHED, +TV_REORDER_BLOCKS, +TV_SHORTEN_BRANCH, +TV_REG_STACK, +TV_FINAL, +TV_SYMOUT, +TV_VAR_TRACKING, + + +TV_REST_OF_COMPILATION, +# 76 "../../GCC/gcc/timevar.h" 2 + TIMEVAR_LAST +} +timevar_id_t; + + + + + + + +extern void timevar_init (void); +extern void timevar_push_1 (timevar_id_t); +extern void timevar_pop_1 (timevar_id_t); +extern void timevar_start (timevar_id_t); +extern void timevar_stop (timevar_id_t); +extern void timevar_print (FILE *); + + +extern void print_time (const char *, long); + +extern unsigned char timevar_enable; + +extern size_t timevar_ggc_mem_total; +# 49 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/c-pragma.h" 1 +# 24 "../../GCC/gcc/c-pragma.h" +# 1 "../../GCC/gcc/../libcpp/include/cpplib.h" 1 +# 25 "../../GCC/gcc/c-pragma.h" 2 + + + +typedef enum pragma_kind { + PRAGMA_NONE = 0, + + PRAGMA_OMP_ATOMIC, + PRAGMA_OMP_BARRIER, + PRAGMA_OMP_CRITICAL, + PRAGMA_OMP_FLUSH, + PRAGMA_OMP_FOR, + PRAGMA_OMP_MASTER, + PRAGMA_OMP_ORDERED, + PRAGMA_OMP_PARALLEL, + PRAGMA_OMP_PARALLEL_FOR, + PRAGMA_OMP_PARALLEL_SECTIONS, + PRAGMA_OMP_SECTION, + PRAGMA_OMP_SECTIONS, + PRAGMA_OMP_SINGLE, + PRAGMA_OMP_THREADPRIVATE, + + PRAGMA_GCC_PCH_PREPROCESS, + + PRAGMA_FIRST_EXTERNAL +} pragma_kind; + + + +extern int yydebug; + +extern struct cpp_reader* parse_in; +# 77 "../../GCC/gcc/c-pragma.h" +extern void push_visibility (const char *); +extern void pop_visibility (void); + +extern void init_pragma (void); + + +typedef void (*pragma_handler)(struct cpp_reader *); +extern void c_register_pragma (const char *, const char *, pragma_handler); +extern void c_register_pragma_with_expansion (const char *, const char *, + pragma_handler); +extern void c_invoke_pragma_handler (unsigned int); + +extern void maybe_apply_pragma_weak (tree); +extern void maybe_apply_pending_pragma_weaks (void); +extern tree maybe_apply_renaming_pragma (tree, tree); +extern void add_to_renaming_pragma_list (tree, tree); + +extern enum cpp_ttype pragma_lex (tree *); + + + + +extern enum cpp_ttype c_lex_with_flags (tree *, location_t *, unsigned char *); + + + + + +extern int c_lex_string_translate; + + + +extern unsigned char c_lex_return_raw_strings; +# 50 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/c-tree.h" 1 +# 24 "../../GCC/gcc/c-tree.h" +# 1 "../../GCC/gcc/c-common.h" 1 +# 24 "../../GCC/gcc/c-common.h" +# 1 "../../GCC/gcc/../include/splay-tree.h" 1 +# 47 "../../GCC/gcc/../include/splay-tree.h" +typedef unsigned long int splay_tree_key; +typedef unsigned long int splay_tree_value; + + +typedef struct splay_tree_node_s *splay_tree_node; + + + +typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key); + + + +typedef void (*splay_tree_delete_key_fn) (splay_tree_key); + + + +typedef void (*splay_tree_delete_value_fn) (splay_tree_value); + + +typedef int (*splay_tree_foreach_fn) (splay_tree_node, void*); + + + + + +typedef void *(*splay_tree_allocate_fn) (int, void *); + + + + + +typedef void (*splay_tree_deallocate_fn) (void *, void *); + + +struct splay_tree_node_s +{ + + splay_tree_key key; + + + splay_tree_value value; + + + splay_tree_node left; + splay_tree_node right; +}; + + +struct splay_tree_s +{ + + splay_tree_node root; + + + splay_tree_compare_fn comp; + + + splay_tree_delete_key_fn delete_key; + + + splay_tree_delete_value_fn delete_value; + + + splay_tree_allocate_fn allocate; + splay_tree_deallocate_fn deallocate; + void * allocate_data; + +}; +typedef struct splay_tree_s *splay_tree; + +extern splay_tree splay_tree_new (splay_tree_compare_fn, + splay_tree_delete_key_fn, + splay_tree_delete_value_fn); +extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn, + splay_tree_delete_key_fn, + splay_tree_delete_value_fn, + splay_tree_allocate_fn, + splay_tree_deallocate_fn, + void *); +extern void splay_tree_delete (splay_tree); +extern splay_tree_node splay_tree_insert (splay_tree, + splay_tree_key, + splay_tree_value); +extern void splay_tree_remove (splay_tree, splay_tree_key); +extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key); +extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key); +extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key); +extern splay_tree_node splay_tree_max (splay_tree); +extern splay_tree_node splay_tree_min (splay_tree); +extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*); +extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key); +extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key); +# 25 "../../GCC/gcc/c-common.h" 2 + +# 1 "../../GCC/gcc/ggc.h" 1 +# 29 "../../GCC/gcc/ggc.h" +extern const char empty_string[]; +extern const char digit_vector[]; + + + + + + +typedef void (*gt_pointer_operator) (void *, void *); + +# 1 "./gtype-desc.h" 1 +# 23 "./gtype-desc.h" +enum gt_types_enum { + gt_ggc_e_11align_stack, + gt_ggc_e_7c_scope, + gt_ggc_e_9c_binding, + gt_ggc_e_20prod_token_parm_item, + gt_ggc_e_12nesting_info, + gt_ggc_e_11var_map_elt, + gt_ggc_e_20ssa_operand_memory_d, + gt_ggc_e_8c_parser, + gt_ggc_e_12int_tree_map, + gt_ggc_e_6subvar, + gt_ggc_e_17VEC_alias_pair_gc, + gt_ggc_e_24constant_descriptor_tree, + gt_ggc_e_17rtx_constant_pool, + gt_ggc_e_12tree_int_map, + gt_ggc_e_9type_hash, + gt_ggc_e_16string_pool_data, + gt_ggc_e_15throw_stmt_node, + gt_ggc_e_16VEC_eh_region_gc, + gt_ggc_e_9eh_region, + gt_ggc_e_13ehl_map_entry, + gt_ggc_e_16var_loc_list_def, + gt_ggc_e_12var_loc_node, + gt_ggc_e_16limbo_die_struct, + gt_ggc_e_19VEC_dw_attr_node_gc, + gt_ggc_e_16dw_ranges_struct, + gt_ggc_e_14pubname_struct, + gt_ggc_e_28dw_separate_line_info_struct, + gt_ggc_e_19dw_line_info_struct, + gt_ggc_e_18dw_loc_list_struct, + gt_ggc_e_15dwarf_file_data, + gt_ggc_e_15queued_reg_save, + gt_ggc_e_20indirect_string_node, + gt_ggc_e_19dw_loc_descr_struct, + gt_ggc_e_13dw_fde_struct, + gt_ggc_e_13dw_cfi_struct, + gt_ggc_e_8typeinfo, + gt_ggc_e_22VEC_alias_set_entry_gc, + gt_ggc_e_15alias_set_entry, + gt_ggc_e_10c_arg_info, + gt_ggc_e_8c_switch, + gt_ggc_e_18sorted_fields_type, + gt_ggc_e_15cgraph_asm_node, + gt_ggc_e_19cgraph_varpool_node, + gt_ggc_e_11cgraph_edge, + gt_ggc_e_11cgraph_node, + gt_ggc_e_18VEC_basic_block_gc, + gt_ggc_e_15edge_prediction, + gt_ggc_e_11rtl_bb_info, + gt_ggc_e_7et_node, + gt_ggc_e_4loop, + gt_ggc_e_11VEC_edge_gc, + gt_ggc_e_12elt_loc_list, + gt_ggc_e_17cselib_val_struct, + gt_ggc_e_25ipa_reference_vars_info_d, + gt_ggc_e_15varray_head_tag, + gt_ggc_e_8edge_def, + gt_ggc_e_8elt_list, + gt_ggc_e_12reg_info_def, + gt_ggc_e_17language_function, + gt_ggc_e_20initial_value_struct, + gt_ggc_e_18control_flow_graph, + gt_ggc_e_13varasm_status, + gt_ggc_e_9eh_status, + gt_ggc_e_18VEC_temp_slot_p_gc, + gt_ggc_e_9temp_slot, + gt_ggc_e_11expr_status, + gt_ggc_e_11emit_status, + gt_ggc_e_14sequence_stack, + gt_ggc_e_14var_refs_queue, + gt_ggc_e_8tree_map, + gt_ggc_e_14lang_tree_node, + gt_ggc_e_9value_set, + gt_ggc_e_24tree_statement_list_node, + gt_ggc_e_8function, + gt_ggc_e_9lang_decl, + gt_ggc_e_9lang_type, + gt_ggc_e_10die_struct, + gt_ggc_e_12ptr_info_def, + gt_ggc_e_17ssa_use_operand_d, + gt_ggc_e_22VEC_constructor_elt_gc, + gt_ggc_e_10tree_ann_d, + gt_ggc_e_11VEC_tree_gc, + gt_ggc_e_13convert_optab, + gt_ggc_e_5optab, + gt_ggc_e_23constant_descriptor_rtx, + gt_ggc_e_15basic_block_def, + gt_ggc_e_10real_value, + gt_ggc_e_10VEC_rtx_gc, + gt_ggc_e_12object_block, + gt_ggc_e_9reg_attrs, + gt_ggc_e_9mem_attrs, + gt_ggc_e_18bitmap_element_def, + gt_ggc_e_14bitmap_obstack, + gt_ggc_e_17stack_local_entry, + gt_ggc_e_16machine_function, + gt_ggc_e_6answer, + gt_ggc_e_9cpp_macro, + gt_ggc_e_9cpp_token, + gt_ggc_e_7section, + gt_ggc_e_9tree_node, + gt_ggc_e_9rtvec_def, + gt_ggc_e_7rtx_def, + gt_ggc_e_15bitmap_head_def, + gt_ggc_e_10location_s, + gt_e_II17splay_tree_node_s, + gt_e_SP9tree_node17splay_tree_node_s, + gt_e_IP9tree_node17splay_tree_node_s, + gt_e_P9tree_nodeP9tree_node17splay_tree_node_s, + gt_e_P9tree_nodeP9tree_node12splay_tree_s, + gt_e_IP9tree_node12splay_tree_s, + gt_e_P11var_map_elt4htab, + gt_e_P12int_tree_map4htab, + gt_e_P23constant_descriptor_rtx4htab, + gt_e_P24constant_descriptor_tree4htab, + gt_e_P12object_block4htab, + gt_e_P7section4htab, + gt_e_P12tree_int_map4htab, + gt_e_P8tree_map4htab, + gt_e_P9type_hash4htab, + gt_e_P13ehl_map_entry4htab, + gt_e_P15throw_stmt_node4htab, + gt_e_P9reg_attrs4htab, + gt_e_P9mem_attrs4htab, + gt_e_P7rtx_def4htab, + gt_e_SP9tree_node12splay_tree_s, + gt_e_P16var_loc_list_def4htab, + gt_e_P10die_struct4htab, + gt_e_P15dwarf_file_data4htab, + gt_e_P20indirect_string_node4htab, + gt_e_P19cgraph_varpool_node4htab, + gt_e_P11cgraph_node4htab, + gt_e_II12splay_tree_s, + gt_e_P11cgraph_edge4htab, + gt_e_P9tree_node4htab, + gt_types_enum_last +}; + + + + + +extern void gt_ggc_mx_align_stack (void *); + + + +extern void gt_ggc_mx_c_scope (void *); + + + +extern void gt_ggc_mx_c_binding (void *); + + + +extern void gt_ggc_mx_prod_token_parm_item (void *); + + + +extern void gt_ggc_mx_nesting_info (void *); + + + +extern void gt_ggc_mx_var_map_elt (void *); + + + +extern void gt_ggc_mx_ssa_operand_memory_d (void *); + + + +extern void gt_ggc_mx_c_parser (void *); + + + +extern void gt_ggc_mx_int_tree_map (void *); + + + +extern void gt_ggc_mx_subvar (void *); + + + +extern void gt_ggc_mx_VEC_alias_pair_gc (void *); + + + +extern void gt_ggc_mx_constant_descriptor_tree (void *); + + + +extern void gt_ggc_mx_rtx_constant_pool (void *); + + + +extern void gt_ggc_mx_tree_int_map (void *); + + + +extern void gt_ggc_mx_type_hash (void *); + + + +extern void gt_ggc_mx_string_pool_data (void *); + + + +extern void gt_ggc_mx_throw_stmt_node (void *); + + + +extern void gt_ggc_mx_VEC_eh_region_gc (void *); + + + +extern void gt_ggc_mx_eh_region (void *); + + + +extern void gt_ggc_mx_ehl_map_entry (void *); + + + +extern void gt_ggc_mx_var_loc_list_def (void *); + + + +extern void gt_ggc_mx_var_loc_node (void *); + + + +extern void gt_ggc_mx_limbo_die_struct (void *); + + + +extern void gt_ggc_mx_VEC_dw_attr_node_gc (void *); + + + +extern void gt_ggc_mx_dw_ranges_struct (void *); + + + +extern void gt_ggc_mx_pubname_struct (void *); + + + +extern void gt_ggc_mx_dw_separate_line_info_struct (void *); + + + +extern void gt_ggc_mx_dw_line_info_struct (void *); + + + +extern void gt_ggc_mx_dw_loc_list_struct (void *); + + + +extern void gt_ggc_mx_dwarf_file_data (void *); + + + +extern void gt_ggc_mx_queued_reg_save (void *); + + + +extern void gt_ggc_mx_indirect_string_node (void *); + + + +extern void gt_ggc_mx_dw_loc_descr_struct (void *); + + + +extern void gt_ggc_mx_dw_fde_struct (void *); + + + +extern void gt_ggc_mx_dw_cfi_struct (void *); + + + +extern void gt_ggc_mx_typeinfo (void *); + + + +extern void gt_ggc_mx_VEC_alias_set_entry_gc (void *); + + + +extern void gt_ggc_mx_alias_set_entry (void *); + + + +extern void gt_ggc_mx_c_arg_info (void *); + + + +extern void gt_ggc_mx_c_switch (void *); + + + +extern void gt_ggc_mx_sorted_fields_type (void *); + + + +extern void gt_ggc_mx_cgraph_asm_node (void *); + + + +extern void gt_ggc_mx_cgraph_varpool_node (void *); + + + +extern void gt_ggc_mx_cgraph_edge (void *); + + + +extern void gt_ggc_mx_cgraph_node (void *); + + + +extern void gt_ggc_mx_VEC_basic_block_gc (void *); + + + +extern void gt_ggc_mx_edge_prediction (void *); + + + +extern void gt_ggc_mx_rtl_bb_info (void *); + + + +extern void gt_ggc_mx_et_node (void *); + + + +extern void gt_ggc_mx_loop (void *); + + + +extern void gt_ggc_mx_VEC_edge_gc (void *); + + + +extern void gt_ggc_mx_elt_loc_list (void *); + + + +extern void gt_ggc_mx_cselib_val_struct (void *); + + + +extern void gt_ggc_mx_ipa_reference_vars_info_d (void *); + + + +extern void gt_ggc_mx_varray_head_tag (void *); + + + +extern void gt_ggc_mx_edge_def (void *); + + + +extern void gt_ggc_mx_elt_list (void *); + + + +extern void gt_ggc_mx_reg_info_def (void *); + + + +extern void gt_ggc_mx_language_function (void *); + + + +extern void gt_ggc_mx_initial_value_struct (void *); + + + +extern void gt_ggc_mx_control_flow_graph (void *); + + + +extern void gt_ggc_mx_varasm_status (void *); + + + +extern void gt_ggc_mx_eh_status (void *); + + + +extern void gt_ggc_mx_VEC_temp_slot_p_gc (void *); + + + +extern void gt_ggc_mx_temp_slot (void *); + + + +extern void gt_ggc_mx_expr_status (void *); + + + +extern void gt_ggc_mx_emit_status (void *); + + + +extern void gt_ggc_mx_sequence_stack (void *); + + + +extern void gt_ggc_mx_var_refs_queue (void *); + + + +extern void gt_ggc_mx_tree_map (void *); + + + +extern void gt_ggc_mx_lang_tree_node (void *); + + + +extern void gt_ggc_mx_value_set (void *); + + + +extern void gt_ggc_mx_tree_statement_list_node (void *); + + + +extern void gt_ggc_mx_function (void *); + + + +extern void gt_ggc_mx_lang_decl (void *); + + + +extern void gt_ggc_mx_lang_type (void *); + + + +extern void gt_ggc_mx_die_struct (void *); + + + +extern void gt_ggc_mx_ptr_info_def (void *); + + + +extern void gt_ggc_mx_ssa_use_operand_d (void *); + + + +extern void gt_ggc_mx_VEC_constructor_elt_gc (void *); + + + +extern void gt_ggc_mx_tree_ann_d (void *); + + + +extern void gt_ggc_mx_VEC_tree_gc (void *); + + + +extern void gt_ggc_mx_convert_optab (void *); + + + +extern void gt_ggc_mx_optab (void *); + + + +extern void gt_ggc_mx_constant_descriptor_rtx (void *); + + + +extern void gt_ggc_mx_basic_block_def (void *); + + + +extern void gt_ggc_mx_real_value (void *); + + + +extern void gt_ggc_mx_VEC_rtx_gc (void *); + + + +extern void gt_ggc_mx_object_block (void *); + + + +extern void gt_ggc_mx_reg_attrs (void *); + + + +extern void gt_ggc_mx_mem_attrs (void *); + + + +extern void gt_ggc_mx_bitmap_element_def (void *); + + + +extern void gt_ggc_mx_bitmap_obstack (void *); + + + +extern void gt_ggc_mx_stack_local_entry (void *); + + + +extern void gt_ggc_mx_machine_function (void *); + + + +extern void gt_ggc_mx_answer (void *); + + + +extern void gt_ggc_mx_cpp_macro (void *); + + + +extern void gt_ggc_mx_cpp_token (void *); + + + +extern void gt_ggc_mx_section (void *); + + + + + + + +extern void gt_ggc_mx_rtvec_def (void *); + + + +extern void gt_ggc_mx_rtx_def (void *); + + + +extern void gt_ggc_mx_bitmap_head_def (void *); + + + +extern void gt_ggc_mx_location_s (void *); +extern void gt_ggc_m_II17splay_tree_node_s (void *); +extern void gt_ggc_m_SP9tree_node17splay_tree_node_s (void *); +extern void gt_ggc_m_IP9tree_node17splay_tree_node_s (void *); +extern void gt_ggc_m_P9tree_nodeP9tree_node17splay_tree_node_s (void *); +extern void gt_ggc_m_P9tree_nodeP9tree_node12splay_tree_s (void *); +extern void gt_ggc_m_IP9tree_node12splay_tree_s (void *); +extern void gt_ggc_m_P11var_map_elt4htab (void *); +extern void gt_ggc_m_P12int_tree_map4htab (void *); +extern void gt_ggc_m_P23constant_descriptor_rtx4htab (void *); +extern void gt_ggc_m_P24constant_descriptor_tree4htab (void *); +extern void gt_ggc_m_P12object_block4htab (void *); +extern void gt_ggc_m_P7section4htab (void *); +extern void gt_ggc_m_P12tree_int_map4htab (void *); +extern void gt_ggc_m_P8tree_map4htab (void *); +extern void gt_ggc_m_P9type_hash4htab (void *); +extern void gt_ggc_m_P13ehl_map_entry4htab (void *); +extern void gt_ggc_m_P15throw_stmt_node4htab (void *); +extern void gt_ggc_m_P9reg_attrs4htab (void *); +extern void gt_ggc_m_P9mem_attrs4htab (void *); +extern void gt_ggc_m_P7rtx_def4htab (void *); +extern void gt_ggc_m_SP9tree_node12splay_tree_s (void *); +extern void gt_ggc_m_P16var_loc_list_def4htab (void *); +extern void gt_ggc_m_P10die_struct4htab (void *); +extern void gt_ggc_m_P15dwarf_file_data4htab (void *); +extern void gt_ggc_m_P20indirect_string_node4htab (void *); +extern void gt_ggc_m_P19cgraph_varpool_node4htab (void *); +extern void gt_ggc_m_P11cgraph_node4htab (void *); +extern void gt_ggc_m_II12splay_tree_s (void *); +extern void gt_ggc_m_P11cgraph_edge4htab (void *); +extern void gt_ggc_m_P9tree_node4htab (void *); + + + + + +extern void gt_pch_nx_align_stack (void *); + + + +extern void gt_pch_nx_c_scope (void *); + + + +extern void gt_pch_nx_c_binding (void *); + + + +extern void gt_pch_nx_prod_token_parm_item (void *); + + + +extern void gt_pch_nx_nesting_info (void *); + + + +extern void gt_pch_nx_var_map_elt (void *); + + + +extern void gt_pch_nx_ssa_operand_memory_d (void *); + + + +extern void gt_pch_nx_c_parser (void *); + + + +extern void gt_pch_nx_int_tree_map (void *); + + + +extern void gt_pch_nx_subvar (void *); + + + +extern void gt_pch_nx_VEC_alias_pair_gc (void *); + + + +extern void gt_pch_nx_constant_descriptor_tree (void *); + + + +extern void gt_pch_nx_rtx_constant_pool (void *); + + + +extern void gt_pch_nx_tree_int_map (void *); + + + +extern void gt_pch_nx_type_hash (void *); + + + +extern void gt_pch_nx_string_pool_data (void *); + + + +extern void gt_pch_nx_throw_stmt_node (void *); + + + +extern void gt_pch_nx_VEC_eh_region_gc (void *); + + + +extern void gt_pch_nx_eh_region (void *); + + + +extern void gt_pch_nx_ehl_map_entry (void *); + + + +extern void gt_pch_nx_var_loc_list_def (void *); + + + +extern void gt_pch_nx_var_loc_node (void *); + + + +extern void gt_pch_nx_limbo_die_struct (void *); + + + +extern void gt_pch_nx_VEC_dw_attr_node_gc (void *); + + + +extern void gt_pch_nx_dw_ranges_struct (void *); + + + +extern void gt_pch_nx_pubname_struct (void *); + + + +extern void gt_pch_nx_dw_separate_line_info_struct (void *); + + + +extern void gt_pch_nx_dw_line_info_struct (void *); + + + +extern void gt_pch_nx_dw_loc_list_struct (void *); + + + +extern void gt_pch_nx_dwarf_file_data (void *); + + + +extern void gt_pch_nx_queued_reg_save (void *); + + + +extern void gt_pch_nx_indirect_string_node (void *); + + + +extern void gt_pch_nx_dw_loc_descr_struct (void *); + + + +extern void gt_pch_nx_dw_fde_struct (void *); + + + +extern void gt_pch_nx_dw_cfi_struct (void *); + + + +extern void gt_pch_nx_typeinfo (void *); + + + +extern void gt_pch_nx_VEC_alias_set_entry_gc (void *); + + + +extern void gt_pch_nx_alias_set_entry (void *); + + + +extern void gt_pch_nx_c_arg_info (void *); + + + +extern void gt_pch_nx_c_switch (void *); + + + +extern void gt_pch_nx_sorted_fields_type (void *); + + + +extern void gt_pch_nx_cgraph_asm_node (void *); + + + +extern void gt_pch_nx_cgraph_varpool_node (void *); + + + +extern void gt_pch_nx_cgraph_edge (void *); + + + +extern void gt_pch_nx_cgraph_node (void *); + + + +extern void gt_pch_nx_VEC_basic_block_gc (void *); + + + +extern void gt_pch_nx_edge_prediction (void *); + + + +extern void gt_pch_nx_rtl_bb_info (void *); + + + +extern void gt_pch_nx_et_node (void *); + + + +extern void gt_pch_nx_loop (void *); + + + +extern void gt_pch_nx_VEC_edge_gc (void *); + + + +extern void gt_pch_nx_elt_loc_list (void *); + + + +extern void gt_pch_nx_cselib_val_struct (void *); + + + +extern void gt_pch_nx_ipa_reference_vars_info_d (void *); + + + +extern void gt_pch_nx_varray_head_tag (void *); + + + +extern void gt_pch_nx_edge_def (void *); + + + +extern void gt_pch_nx_elt_list (void *); + + + +extern void gt_pch_nx_reg_info_def (void *); + + + +extern void gt_pch_nx_language_function (void *); + + + +extern void gt_pch_nx_initial_value_struct (void *); + + + +extern void gt_pch_nx_control_flow_graph (void *); + + + +extern void gt_pch_nx_varasm_status (void *); + + + +extern void gt_pch_nx_eh_status (void *); + + + +extern void gt_pch_nx_VEC_temp_slot_p_gc (void *); + + + +extern void gt_pch_nx_temp_slot (void *); + + + +extern void gt_pch_nx_expr_status (void *); + + + +extern void gt_pch_nx_emit_status (void *); + + + +extern void gt_pch_nx_sequence_stack (void *); + + + +extern void gt_pch_nx_var_refs_queue (void *); + + + +extern void gt_pch_nx_tree_map (void *); + + + +extern void gt_pch_nx_lang_tree_node (void *); + + + +extern void gt_pch_nx_value_set (void *); + + + +extern void gt_pch_nx_tree_statement_list_node (void *); + + + +extern void gt_pch_nx_function (void *); + + + +extern void gt_pch_nx_lang_decl (void *); + + + +extern void gt_pch_nx_lang_type (void *); + + + +extern void gt_pch_nx_die_struct (void *); + + + +extern void gt_pch_nx_ptr_info_def (void *); + + + +extern void gt_pch_nx_ssa_use_operand_d (void *); + + + +extern void gt_pch_nx_VEC_constructor_elt_gc (void *); + + + +extern void gt_pch_nx_tree_ann_d (void *); + + + +extern void gt_pch_nx_VEC_tree_gc (void *); + + + +extern void gt_pch_nx_convert_optab (void *); + + + +extern void gt_pch_nx_optab (void *); + + + +extern void gt_pch_nx_constant_descriptor_rtx (void *); + + + +extern void gt_pch_nx_basic_block_def (void *); + + + +extern void gt_pch_nx_real_value (void *); + + + +extern void gt_pch_nx_VEC_rtx_gc (void *); + + + +extern void gt_pch_nx_object_block (void *); + + + +extern void gt_pch_nx_reg_attrs (void *); + + + +extern void gt_pch_nx_mem_attrs (void *); + + + +extern void gt_pch_nx_bitmap_element_def (void *); + + + +extern void gt_pch_nx_bitmap_obstack (void *); + + + +extern void gt_pch_nx_stack_local_entry (void *); + + + +extern void gt_pch_nx_machine_function (void *); + + + +extern void gt_pch_nx_answer (void *); + + + +extern void gt_pch_nx_cpp_macro (void *); + + + +extern void gt_pch_nx_cpp_token (void *); + + + +extern void gt_pch_nx_section (void *); + + + + + + + +extern void gt_pch_nx_rtvec_def (void *); + + + +extern void gt_pch_nx_rtx_def (void *); + + + +extern void gt_pch_nx_bitmap_head_def (void *); + + + +extern void gt_pch_nx_location_s (void *); +extern void gt_pch_n_II17splay_tree_node_s (void *); +extern void gt_pch_n_SP9tree_node17splay_tree_node_s (void *); +extern void gt_pch_n_IP9tree_node17splay_tree_node_s (void *); +extern void gt_pch_n_P9tree_nodeP9tree_node17splay_tree_node_s (void *); +extern void gt_pch_n_P9tree_nodeP9tree_node12splay_tree_s (void *); +extern void gt_pch_n_IP9tree_node12splay_tree_s (void *); +extern void gt_pch_n_P11var_map_elt4htab (void *); +extern void gt_pch_n_P12int_tree_map4htab (void *); +extern void gt_pch_n_P23constant_descriptor_rtx4htab (void *); +extern void gt_pch_n_P24constant_descriptor_tree4htab (void *); +extern void gt_pch_n_P12object_block4htab (void *); +extern void gt_pch_n_P7section4htab (void *); +extern void gt_pch_n_P12tree_int_map4htab (void *); +extern void gt_pch_n_P8tree_map4htab (void *); +extern void gt_pch_n_P9type_hash4htab (void *); +extern void gt_pch_n_P13ehl_map_entry4htab (void *); +extern void gt_pch_n_P15throw_stmt_node4htab (void *); +extern void gt_pch_n_P9reg_attrs4htab (void *); +extern void gt_pch_n_P9mem_attrs4htab (void *); +extern void gt_pch_n_P7rtx_def4htab (void *); +extern void gt_pch_n_SP9tree_node12splay_tree_s (void *); +extern void gt_pch_n_P16var_loc_list_def4htab (void *); +extern void gt_pch_n_P10die_struct4htab (void *); +extern void gt_pch_n_P15dwarf_file_data4htab (void *); +extern void gt_pch_n_P20indirect_string_node4htab (void *); +extern void gt_pch_n_P19cgraph_varpool_node4htab (void *); +extern void gt_pch_n_P11cgraph_node4htab (void *); +extern void gt_pch_n_II12splay_tree_s (void *); +extern void gt_pch_n_P11cgraph_edge4htab (void *); +extern void gt_pch_n_P9tree_node4htab (void *); + + +extern void gt_pch_p_11align_stack + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_7c_scope + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9c_binding + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_20prod_token_parm_item + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12nesting_info + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11var_map_elt + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_20ssa_operand_memory_d + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8c_parser + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12int_tree_map + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_6subvar + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17VEC_alias_pair_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_24constant_descriptor_tree + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17rtx_constant_pool + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12tree_int_map + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9type_hash + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16string_pool_data + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15throw_stmt_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16VEC_eh_region_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9eh_region + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_13ehl_map_entry + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16var_loc_list_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12var_loc_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16limbo_die_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_19VEC_dw_attr_node_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16dw_ranges_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_14pubname_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_28dw_separate_line_info_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_19dw_line_info_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18dw_loc_list_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15dwarf_file_data + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15queued_reg_save + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_20indirect_string_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_19dw_loc_descr_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_13dw_fde_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_13dw_cfi_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8typeinfo + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_22VEC_alias_set_entry_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15alias_set_entry + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18sorted_fields_type + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15cgraph_asm_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_19cgraph_varpool_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11cgraph_edge + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11cgraph_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18VEC_basic_block_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15edge_prediction + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11rtl_bb_info + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11VEC_edge_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12elt_loc_list + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17cselib_val_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15varray_head_tag + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8edge_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8elt_list + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17language_function + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_20initial_value_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18control_flow_graph + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_13varasm_status + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9eh_status + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18VEC_temp_slot_p_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9temp_slot + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11expr_status + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11emit_status + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_14sequence_stack + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_14var_refs_queue + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8tree_map + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_14lang_tree_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_24tree_statement_list_node + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_8function + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9lang_decl + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9lang_type + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_10die_struct + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12ptr_info_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17ssa_use_operand_d + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_22VEC_constructor_elt_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_10tree_ann_d + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_11VEC_tree_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_13convert_optab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_5optab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_23constant_descriptor_rtx + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15basic_block_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_10real_value + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_10VEC_rtx_gc + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_12object_block + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9reg_attrs + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9mem_attrs + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_18bitmap_element_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_14bitmap_obstack + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_17stack_local_entry + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_16machine_function + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_6answer + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9cpp_macro + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_9cpp_token + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_7section + (void *, void *, gt_pointer_operator, void *); + +extern void gt_pch_p_9rtvec_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_7rtx_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_15bitmap_head_def + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_10location_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_II17splay_tree_node_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_SP9tree_node17splay_tree_node_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_IP9tree_node17splay_tree_node_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9tree_nodeP9tree_node17splay_tree_node_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9tree_nodeP9tree_node12splay_tree_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_IP9tree_node12splay_tree_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P11var_map_elt4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P12int_tree_map4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P23constant_descriptor_rtx4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P24constant_descriptor_tree4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P12object_block4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P7section4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P12tree_int_map4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P8tree_map4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9type_hash4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P13ehl_map_entry4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P15throw_stmt_node4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9reg_attrs4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9mem_attrs4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P7rtx_def4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_SP9tree_node12splay_tree_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P16var_loc_list_def4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P10die_struct4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P15dwarf_file_data4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P20indirect_string_node4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P19cgraph_varpool_node4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P11cgraph_node4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_II12splay_tree_s + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P11cgraph_edge4htab + (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_p_P9tree_node4htab + (void *, void *, gt_pointer_operator, void *); +# 40 "../../GCC/gcc/ggc.h" 2 + + + + +typedef void (*gt_note_pointers) (void *, void *, gt_pointer_operator, + void *); + + + + + + +typedef void (*gt_handle_reorder) (void *, void *, gt_pointer_operator, + void *); + + +extern int gt_pch_note_object (void *, void *, gt_note_pointers, + enum gt_types_enum); + + + +extern void gt_pch_note_reorder (void *, void *, gt_handle_reorder); + + +typedef void (*gt_pointer_walker) (void *); + + + +struct ggc_root_tab { + void *base; + size_t nelt; + size_t stride; + gt_pointer_walker cb; + gt_pointer_walker pchw; +}; + + +extern const struct ggc_root_tab * const gt_ggc_rtab[]; +extern const struct ggc_root_tab * const gt_ggc_deletable_rtab[]; +extern const struct ggc_root_tab * const gt_pch_cache_rtab[]; +extern const struct ggc_root_tab * const gt_pch_scalar_rtab[]; + + +struct htab; +struct ggc_cache_tab { + struct htab * *base; + size_t nelt; + size_t stride; + gt_pointer_walker cb; + gt_pointer_walker pchw; + int (*marked_p) (const void *); +}; + + +extern const struct ggc_cache_tab * const gt_ggc_cache_rtab[]; +# 113 "../../GCC/gcc/ggc.h" +extern int ggc_set_mark (const void *); + + + + +extern int ggc_marked_p (const void *); + + +extern void ggc_mark_stringpool (void); + + + +extern void ggc_mark_roots (void); + + + +extern void gt_pch_save_stringpool (void); +extern void gt_pch_fixup_stringpool (void); +extern void gt_pch_restore_stringpool (void); + + + +extern void gt_pch_p_S (void *, void *, gt_pointer_operator, void *); +extern void gt_pch_n_S (const void *); +extern void gt_ggc_m_S (void *); + + +extern void init_stringpool (void); + + + + + +struct alloc_zone; + + +extern void init_ggc (void); + + +extern struct alloc_zone *new_ggc_zone (const char *); + + +extern void destroy_ggc_zone (struct alloc_zone *); + +struct ggc_pch_data; + + +extern struct ggc_pch_data *init_ggc_pch (void); + + + + + +extern void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, unsigned char, + enum gt_types_enum); + + + +extern size_t ggc_pch_total_size (struct ggc_pch_data *); + + + +extern void ggc_pch_this_base (struct ggc_pch_data *, void *); + + + + +extern char *ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, unsigned char, + enum gt_types_enum); + + +extern void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *); + + +extern void ggc_pch_write_object (struct ggc_pch_data *, FILE *, void *, + void *, size_t, unsigned char); + + +extern void ggc_pch_finish (struct ggc_pch_data *, FILE *); + + + +extern void ggc_pch_read (FILE *, void *); + + + + + +extern unsigned char ggc_force_collect; + + +extern void *ggc_alloc_stat (size_t ); + + +extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t ); + + +extern void *ggc_alloc_cleared_stat (size_t ); + + +extern void *ggc_realloc_stat (void *, size_t ); + + +extern void *ggc_calloc (size_t, size_t); + +extern void ggc_free (void *); + +extern void ggc_record_overhead (size_t, size_t, void * ); +extern void ggc_free_overhead (void *); +extern void ggc_prune_overhead_list (void); + +extern void dump_ggc_loc_statistics (void); +# 248 "../../GCC/gcc/ggc.h" +extern void *ggc_splay_alloc (int, void *); +extern void ggc_splay_dont_free (void *, void *); + + + + +extern const char *ggc_alloc_string (const char *contents, int length); + + + + + + +extern void ggc_collect (void); + + +extern size_t ggc_get_size (const void *); + + +extern void gt_pch_save (FILE *f); + + +extern void gt_pch_restore (FILE *f); + + + + + +typedef struct ggc_statistics +{ + + int unused; +} ggc_statistics; + + + +extern void ggc_print_common_statistics (FILE *, ggc_statistics *); + + +extern void ggc_print_statistics (void); +extern void stringpool_statistics (void); + + +extern int ggc_min_expand_heuristic (void); +extern int ggc_min_heapsize_heuristic (void); +extern void init_ggc_heuristics (void); +# 27 "../../GCC/gcc/c-common.h" 2 +# 45 "../../GCC/gcc/c-common.h" +enum rid +{ + + + RID_STATIC = 0, + RID_UNSIGNED, RID_LONG, RID_CONST, RID_EXTERN, + RID_REGISTER, RID_TYPEDEF, RID_SHORT, RID_INLINE, + RID_VOLATILE, RID_SIGNED, RID_AUTO, RID_RESTRICT, + + + RID_COMPLEX, RID_THREAD, + + + RID_FRIEND, RID_VIRTUAL, RID_EXPLICIT, RID_EXPORT, RID_MUTABLE, + + + RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF, RID_ONEWAY, + + + RID_INT, RID_CHAR, RID_FLOAT, RID_DOUBLE, RID_VOID, + RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE, + RID_WHILE, RID_DO, RID_FOR, RID_SWITCH, RID_CASE, + RID_DEFAULT, RID_BREAK, RID_CONTINUE, RID_RETURN, RID_GOTO, + RID_SIZEOF, + + + RID_ASM, RID_TYPEOF, RID_ALIGNOF, RID_ATTRIBUTE, RID_VA_ARG, + RID_EXTENSION, RID_IMAGPART, RID_REALPART, RID_LABEL, RID_CHOOSE_EXPR, + RID_TYPES_COMPATIBLE_P, + RID_DFLOAT32, RID_DFLOAT64, RID_DFLOAT128, + + + RID_FUNCTION_NAME, RID_PRETTY_FUNCTION_NAME, RID_C99_FUNCTION_NAME, + + + RID_BOOL, RID_WCHAR, RID_CLASS, + RID_PUBLIC, RID_PRIVATE, RID_PROTECTED, + RID_TEMPLATE, RID_NULL, RID_CATCH, + RID_DELETE, RID_FALSE, RID_NAMESPACE, + RID_NEW, RID_OFFSETOF, RID_OPERATOR, + RID_THIS, RID_THROW, RID_TRUE, + RID_TRY, RID_TYPENAME, RID_TYPEID, + RID_USING, + + + RID_CONSTCAST, RID_DYNCAST, RID_REINTCAST, RID_STATCAST, + + + RID_AT_ENCODE, RID_AT_END, + RID_AT_CLASS, RID_AT_ALIAS, RID_AT_DEFS, + RID_AT_PRIVATE, RID_AT_PROTECTED, RID_AT_PUBLIC, + RID_AT_PROTOCOL, RID_AT_SELECTOR, + RID_AT_THROW, RID_AT_TRY, RID_AT_CATCH, + RID_AT_FINALLY, RID_AT_SYNCHRONIZED, + RID_AT_INTERFACE, + RID_AT_IMPLEMENTATION, + + + + RID_CbC_CODE, RID_CbC_ENV, + + + RID_MAX, + + RID_FIRST_MODIFIER = RID_STATIC, + RID_LAST_MODIFIER = RID_ONEWAY, + + RID_FIRST_AT = RID_AT_ENCODE, + RID_LAST_AT = RID_AT_IMPLEMENTATION, + RID_FIRST_PQ = RID_IN, + RID_LAST_PQ = RID_ONEWAY +}; +# 128 "../../GCC/gcc/c-common.h" +extern tree *ridpointers; + + + +enum c_tree_index +{ + CTI_WCHAR_TYPE, + CTI_SIGNED_WCHAR_TYPE, + CTI_UNSIGNED_WCHAR_TYPE, + CTI_WINT_TYPE, + CTI_SIGNED_SIZE_TYPE, + CTI_UNSIGNED_PTRDIFF_TYPE, + CTI_INTMAX_TYPE, + CTI_UINTMAX_TYPE, + CTI_WIDEST_INT_LIT_TYPE, + CTI_WIDEST_UINT_LIT_TYPE, + + CTI_CHAR_ARRAY_TYPE, + CTI_WCHAR_ARRAY_TYPE, + CTI_INT_ARRAY_TYPE, + CTI_STRING_TYPE, + CTI_CONST_STRING_TYPE, + + + CTI_TRUTHVALUE_TYPE, + CTI_TRUTHVALUE_TRUE, + CTI_TRUTHVALUE_FALSE, + + CTI_DEFAULT_FUNCTION_TYPE, + + + CTI_FUNCTION_NAME_DECL, + CTI_PRETTY_FUNCTION_NAME_DECL, + CTI_C99_FUNCTION_NAME_DECL, + CTI_SAVED_FUNCTION_NAME_DECLS, + + CTI_VOID_ZERO, + + CTI_NULL, + + CTI_MAX +}; + + + + + +struct c_common_identifier +{ + struct tree_common common; + struct cpp_hashnode node; +}; +# 215 "../../GCC/gcc/c-common.h" +extern tree c_global_trees[CTI_MAX]; + + + +struct sorted_fields_type +{ + int len; + tree elts[1]; +}; + + + + + +typedef enum c_language_kind +{ + clk_c = 0, + clk_objc = 1, + clk_cxx = 2, + clk_objcxx = 3 +} +c_language_kind; + + + +extern c_language_kind c_language; + + + + + + +struct stmt_tree_s { + + tree x_cur_stmt_list; +# 265 "../../GCC/gcc/c-common.h" + int stmts_are_full_exprs_p; +}; + +typedef struct stmt_tree_s *stmt_tree; + + + + +struct c_language_function { + + + struct stmt_tree_s x_stmt_tree; +}; +# 289 "../../GCC/gcc/c-common.h" +extern int (*lang_missing_noreturn_ok_p) (tree); + + + +extern void (*lang_post_pch_load) (void); + +extern void push_file_scope (void); +extern void pop_file_scope (void); +extern stmt_tree current_stmt_tree (void); +extern tree push_stmt_list (void); +extern tree pop_stmt_list (tree); +extern tree add_stmt (tree); +extern void push_cleanup (tree, tree, unsigned char); +extern tree pushdecl_top_level (tree); +extern tree pushdecl (tree); +extern tree build_modify_expr (tree, enum tree_code, tree); +extern tree build_indirect_ref (tree, const char *); + +extern int c_expand_decl (tree); + +extern int field_decl_cmp (const void *, const void *); +extern void resort_sorted_fields (void *, void *, gt_pointer_operator, + void *); +extern unsigned char has_c_linkage (tree decl); + + + + + +extern int flag_preprocess_only; + + + + +extern int flag_nil_receivers; + + + +extern int flag_objc_exceptions; + + +extern int flag_objc_sjlj_exceptions; + + + + +extern int flag_zero_link; + + + + +extern int flag_replace_objc_classes; + + + +extern char flag_no_line_commands; + + + + +extern char flag_no_output; + + + + +extern char flag_dump_macros; + + + +extern char flag_dump_includes; + + + +extern unsigned char flag_pch_preprocess; + + + + +extern const char *pch_file; + + + + +extern int flag_iso; + + + + +extern int flag_undef; + + + +extern int flag_no_builtin; + + + + +extern int flag_no_nonansi_builtin; + + + +extern int flag_short_double; + + + +extern int flag_short_wchar; + + +extern int flag_ms_extensions; + + + +extern int flag_no_asm; + + + + +extern int flag_const_strings; + + + +extern int flag_signed_bitfields; + + + +extern int warn_unknown_pragmas; + + + + +extern int warn_format; +# 428 "../../GCC/gcc/c-common.h" +extern int flag_cond_mismatch; + + + +extern int flag_isoc94; + + + +extern int flag_isoc99; + + + +extern int flag_hosted; + + + +extern int warn_main; +# 453 "../../GCC/gcc/c-common.h" +extern int flag_gen_declaration; + + + + + +extern int print_struct_values; + + + +extern const char *constant_string_class_name; + + + + + + + +extern int flag_no_gnu_keywords; + + + + +extern int flag_implement_inlines; + + + +extern int flag_implicit_templates; + + + + + +extern int flag_implicit_inline_templates; + + + + +extern int flag_use_repository; + + + + +extern int flag_optional_diags; + + + +extern int flag_elide_constructors; + + + + +extern int flag_default_inline; + + + + +extern int flag_rtti; + + + + + + +extern int flag_conserve_space; + + + +extern int flag_access_control; + + + + +extern int flag_check_new; +# 535 "../../GCC/gcc/c-common.h" +extern int flag_new_for_scope; + + + + + +extern int flag_weak; + + + + + + +extern int flag_working_directory; + + + + +extern int flag_use_cxa_atexit; + + + + +extern int flag_use_cxa_get_exception_ptr; + + + + +extern int flag_permissive; + + + + + + +extern int flag_enforce_eh_specs; + + + + +extern int flag_threadsafe_statics; + + + +extern int warn_implicit; + + + + + +extern int warn_strict_null_sentinel; + + + + + +extern int max_tinst_depth; + + + + +extern int skip_evaluation; +# 615 "../../GCC/gcc/c-common.h" +extern const struct attribute_spec c_common_attribute_table[]; +extern const struct attribute_spec c_common_format_attribute_table[]; + + + + + + +extern tree (*make_fname_decl) (tree, int); + +extern tree identifier_global_value (tree); +extern void record_builtin_type (enum rid, const char *, tree); +extern tree build_void_list_node (void); +extern void start_fname_decls (void); +extern void finish_fname_decls (void); +extern const char *fname_as_string (int); +extern tree fname_decl (unsigned, tree); + +extern void check_function_arguments (tree, tree, tree); +extern void check_function_arguments_recurse (void (*) + (void *, tree, + unsigned long), + void *, tree, + unsigned long); +extern void check_function_format (tree, tree); +extern void set_Wformat (int); +extern tree handle_format_attribute (tree *, tree, tree, int, unsigned char *); +extern tree handle_format_arg_attribute (tree *, tree, tree, int, unsigned char *); +extern int c_common_handle_option (size_t code, const char *arg, int value); +extern unsigned char c_common_missing_argument (const char *opt, size_t code); +extern tree c_common_type_for_mode (enum machine_mode, int); +extern tree c_common_type_for_size (unsigned int, int); +extern tree c_common_unsigned_type (tree); +extern tree c_common_signed_type (tree); +extern tree c_common_signed_or_unsigned_type (int, tree); +extern tree c_build_bitfield_integer_type (unsigned long, int); +extern tree c_common_truthvalue_conversion (tree); +extern void c_apply_type_quals_to_decl (int, tree); +extern tree c_sizeof_or_alignof_type (tree, unsigned char, int); +extern tree c_alignof_expr (tree); + + +extern void binary_op_error (enum tree_code); +extern tree fix_string_type (tree); +struct varray_head_tag; +extern void constant_expression_warning (tree); +extern void strict_aliasing_warning(tree, tree, tree); +extern void empty_body_warning (tree, tree); +extern tree convert_and_check (tree, tree); +extern void overflow_warning (tree); +extern unsigned char c_determine_visibility (tree); +extern unsigned char same_scalar_type_ignoring_signedness (tree, tree); + + + + + + + +extern tree shorten_compare (tree *, tree *, tree *, enum tree_code *); + +extern tree pointer_int_sum (enum tree_code, tree, tree); +extern unsigned int min_precision (tree, int); + + +extern tree c_build_qualified_type (tree, int); + + + +extern void c_common_nodes_and_builtins (void); + +extern void set_builtin_user_assembler_name (tree decl, const char *asmspec); + +extern void disable_builtin_function (const char *); + +extern void set_compound_literal_name (tree decl); + +extern tree build_va_arg (tree, tree); + +extern unsigned int c_common_init_options (unsigned int, const char **); +extern unsigned char c_common_post_options (const char **); +extern unsigned char c_common_init (void); +extern void c_common_finish (void); +extern void c_common_parse_file (int); +extern long c_common_get_alias_set (tree); +extern void c_register_builtin_type (tree, const char*); +extern unsigned char c_promoting_integer_type_p (tree); +extern int self_promoting_args_p (tree); +extern tree strip_array_types (tree); +extern tree strip_pointer_operator (tree); +extern long c_common_to_target_charset (long); + + +extern void c_parse_file (void); + +extern void finish_file (void); +# 732 "../../GCC/gcc/c-common.h" +enum c_tree_code { + C_DUMMY_TREE_CODE = LAST_AND_UNUSED_TREE_CODE, +# 1 "../../GCC/gcc/c-common.def" 1 +# 32 "../../GCC/gcc/c-common.def" +COMPOUND_LITERAL_EXPR, +# 735 "../../GCC/gcc/c-common.h" 2 + LAST_C_TREE_CODE +}; + + + +extern int anon_aggr_type_p (tree); +# 754 "../../GCC/gcc/c-common.h" +extern void emit_local_var (tree); +extern tree do_case (tree, tree); +extern tree build_stmt (enum tree_code, ...); +extern tree build_case_label (tree, tree, tree); + + + + +extern tree build_unary_op (enum tree_code, tree, int); +extern tree build_binary_op (enum tree_code, tree, tree, int); +extern tree perform_integral_promotions (tree); + + + + +extern tree default_conversion (tree); + + + + +extern tree common_type (tree, tree); + +extern tree decl_constant_value (tree); + + +extern tree boolean_increment (enum tree_code, tree); + +extern int case_compare (splay_tree_key, splay_tree_key); + +extern tree c_add_case_label (splay_tree, tree, tree, tree, tree); + +extern void c_do_switch_warnings (splay_tree, location_t, tree, tree); + +extern tree build_function_call (tree, tree); + +extern tree resolve_overloaded_builtin (tree, tree); + +extern tree finish_label_address_expr (tree); + + + +extern tree lookup_label (tree); +extern tree lookup_name (tree); + +extern int vector_types_convertible_p (tree t1, tree t2); + +extern rtx c_expand_expr (tree, rtx, enum machine_mode, int, rtx *); + +extern tree c_staticp (tree); + +extern void init_c_lex (void); + +extern void c_cpp_builtins (cpp_reader *); + + + +extern int pending_lang_change; + + + +struct c_fileinfo +{ + int time; + + + + + + + + short interface_only; + short interface_unknown; +}; + +struct c_fileinfo *get_fileinfo (const char *); +extern void dump_time_statistics (void); + +extern unsigned char c_dump_tree (void *, tree); + +extern void c_warn_unused_result (tree *); + +extern void verify_sequence_points (tree); + +extern tree fold_offsetof (tree, tree); + + + + +enum lvalue_use { + lv_assign, + lv_increment, + lv_decrement, + lv_addressof, + lv_asm +}; + +extern void lvalue_error (enum lvalue_use); + +extern int complete_array_type (tree *, tree, unsigned char); + +extern tree builtin_type_for_size (int, unsigned char); + +extern void warn_array_subscript_with_type_char (tree); + + +extern void c_genericize (tree); +extern int c_gimplify_expr (tree *, tree *, tree *); +extern tree c_build_bind_expr (tree, tree); + + +extern void pch_init (void); +extern int c_common_valid_pch (cpp_reader *pfile, const char *name, int fd); +extern void c_common_read_pch (cpp_reader *pfile, const char *name, int fd, + const char *orig); +extern void c_common_write_pch (void); +extern void c_common_no_more_pch (void); +extern void c_common_pch_pragma (cpp_reader *pfile, const char *); +extern void c_common_print_pch_checksum (FILE *f); + + +extern const unsigned char executable_checksum[16]; + +extern void builtin_define_with_value (const char *, const char *, int); +extern void c_stddef_cpp_builtins (void); +extern void fe_file_change (const struct line_map *); +extern void c_parse_error (const char *, enum cpp_ttype, tree); + + + + + +extern tree objc_is_class_name (tree); +extern tree objc_is_object_ptr (tree); +extern void objc_check_decl (tree); +extern int objc_is_reserved_word (tree); +extern unsigned char objc_compare_types (tree, tree, int, tree); +extern void objc_volatilize_decl (tree); +extern unsigned char objc_type_quals_match (tree, tree); +extern tree objc_rewrite_function_call (tree, tree); +extern tree objc_message_selector (void); +extern tree objc_lookup_ivar (tree, tree); +extern void objc_clear_super_receiver (void); +extern int objc_is_public (tree, tree); +extern tree objc_is_id (tree); +extern void objc_declare_alias (tree, tree); +extern void objc_declare_class (tree); +extern void objc_declare_protocols (tree); +extern tree objc_build_message_expr (tree); +extern tree objc_finish_message_expr (tree, tree, tree); +extern tree objc_build_selector_expr (tree); +extern tree objc_build_protocol_expr (tree); +extern tree objc_build_encode_expr (tree); +extern tree objc_build_string_object (tree); +extern tree objc_get_protocol_qualified_type (tree, tree); +extern tree objc_get_class_reference (tree); +extern tree objc_get_class_ivars (tree); +extern void objc_start_class_interface (tree, tree, tree); +extern void objc_start_category_interface (tree, tree, tree); +extern void objc_start_protocol (tree, tree); +extern void objc_continue_interface (void); +extern void objc_finish_interface (void); +extern void objc_start_class_implementation (tree, tree); +extern void objc_start_category_implementation (tree, tree); +extern void objc_continue_implementation (void); +extern void objc_finish_implementation (void); +extern void objc_set_visibility (int); +extern void objc_set_method_type (enum tree_code); +extern tree objc_build_method_signature (tree, tree, tree, unsigned char); +extern void objc_add_method_declaration (tree); +extern void objc_start_method_definition (tree); +extern void objc_finish_method_definition (tree); +extern void objc_add_instance_variable (tree); +extern tree objc_build_keyword_decl (tree, tree, tree); +extern tree objc_build_throw_stmt (tree); +extern void objc_begin_try_stmt (location_t, tree); +extern tree objc_finish_try_stmt (void); +extern void objc_begin_catch_clause (tree); +extern void objc_finish_catch_clause (void); +extern void objc_build_finally_clause (location_t, tree); +extern tree objc_build_synchronized (location_t, tree, tree); +extern int objc_static_init_needed_p (void); +extern tree objc_generate_static_init_call (tree); +extern tree objc_generate_write_barrier (tree, enum tree_code, tree); + + + +extern void *objc_get_current_scope (void); +extern void objc_mark_locals_volatile (void *); + + +extern void init_pp_output (FILE *); +extern void preprocess_file (cpp_reader *); +extern void pp_file_change (const struct line_map *); +extern void pp_dir_change (cpp_reader *, const char *); +extern unsigned char check_missing_format_attribute (tree, tree); + + +extern tree c_finish_omp_master (tree); +extern tree c_finish_omp_critical (tree, tree); +extern tree c_finish_omp_ordered (tree); +extern void c_finish_omp_barrier (void); +extern tree c_finish_omp_atomic (enum tree_code, tree, tree); +extern void c_finish_omp_flush (void); +extern tree c_finish_omp_for (location_t, tree, tree, tree, tree, tree, tree); +extern void c_split_parallel_clauses (tree, tree *, tree *); +extern enum omp_clause_default_kind c_omp_predetermined_sharing (tree); + + +extern unsigned char c_omp_sharing_predetermined (tree); +extern tree c_omp_remap_decl (tree, unsigned char); +# 25 "../../GCC/gcc/c-tree.h" 2 +# 1 "../../GCC/gcc/toplev.h" 1 +# 29 "../../GCC/gcc/toplev.h" +extern int toplev_main (unsigned int, const char **); +extern int read_integral_parameter (const char *, const char *, const int); +extern void strip_off_ending (char *, int); +extern const char *trim_filename (const char *); +extern void _fatal_insn_not_found (rtx, const char *, int, const char *) + __attribute__ ((__noreturn__)); +extern void _fatal_insn (const char *, rtx, const char *, int, const char *) + __attribute__ ((__noreturn__)); +# 56 "../../GCC/gcc/toplev.h" +extern void internal_error (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__noreturn__)); +extern void warning0 (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); + +extern void warning (int, const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 2, 3))) __attribute__ ((__nonnull__ (2))); +extern void error (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); +extern void fatal_error (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))) + __attribute__ ((__noreturn__)); +extern void pedwarn (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); +extern void sorry (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); +extern void inform (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); +extern void verbatim (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1, 2))) __attribute__ ((__nonnull__ (1))); + +extern void rest_of_decl_compilation (tree, int, int); +extern void rest_of_type_compilation (tree, int); +extern void tree_rest_of_compilation (tree); +extern void init_optimization_passes (void); +extern void finish_optimization_passes (void); +extern unsigned char enable_rtl_dump_file (int); + +extern void announce_function (tree); + +extern void error_for_asm (rtx, const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 2, 3))) __attribute__ ((__nonnull__ (2))); +extern void warning_for_asm (rtx, const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 2, 3))) __attribute__ ((__nonnull__ (2))); +extern void warn_deprecated_use (tree); + + +extern void output_quoted_string (FILE *, const char *); +extern void output_file_directive (FILE *, const char *); + + + + + +extern void fnotice (FILE *, const char *, ...) + __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__nonnull__ (2))); + + +extern void wrapup_global_declaration_1 (tree); +extern unsigned char wrapup_global_declaration_2 (tree); +extern unsigned char wrapup_global_declarations (tree *, int); +extern void check_global_declaration_1 (tree); +extern void check_global_declarations (tree *, int); +extern void emit_debug_global_declarations (tree *, int); +extern void write_global_declarations (void); + + +extern unsigned local_tick; + +extern const char *progname; +extern const char *dump_base_name; +extern const char *aux_base_name; +extern const char *aux_info_file_name; +extern const char *asm_file_name; +extern unsigned char exit_after_options; + +extern int target_flags_explicit; + + + + +extern unsigned char user_defined_section_attribute; + + +extern int flag_crossjumping; +extern int flag_if_conversion; +extern int flag_if_conversion2; +extern int flag_keep_static_consts; +extern int flag_peel_loops; +extern int flag_rerun_cse_after_loop; +extern int flag_thread_jumps; +extern int flag_tracer; +extern int flag_unroll_loops; +extern int flag_unroll_all_loops; +extern int flag_unswitch_loops; +extern int flag_cprop_registers; +extern int time_report; + + +extern void print_version (FILE *, const char *); +extern void * default_get_pch_validity (size_t *); +extern const char * default_pch_valid_p (const void *, size_t); + + +extern struct ht *ident_hash; + + + + +extern void set_fast_math_flags (int); + + +extern void decode_d_option (const char *); + + +extern unsigned char fast_math_flags_set_p (void); + + +extern int exact_log2 (unsigned long); + + +extern int floor_log2 (unsigned long); +# 172 "../../GCC/gcc/toplev.h" +extern __inline__ int +floor_log2 (unsigned long x) +{ + return x ? (8 * 4) - 1 - (int) __builtin_clzl (x) : -1; +} + +extern __inline__ int +exact_log2 (unsigned long x) +{ + return x == (x & -x) && x ? (int) __builtin_ctzl (x) : -1; +} + + + + + +extern const char *get_src_pwd (void); +extern unsigned char set_src_pwd (const char *); +# 26 "../../GCC/gcc/c-tree.h" 2 +# 1 "../../GCC/gcc/diagnostic.h" 1 +# 25 "../../GCC/gcc/diagnostic.h" +# 1 "../../GCC/gcc/pretty-print.h" 1 +# 24 "../../GCC/gcc/pretty-print.h" +# 1 "../../GCC/gcc/../include/obstack.h" 1 +# 25 "../../GCC/gcc/pretty-print.h" 2 + + + + + + + +typedef struct +{ + const char *format_spec; + va_list *args_ptr; + int err_no; + location_t *locus; +} text_info; + + + + + + +typedef enum +{ + DIAGNOSTICS_SHOW_PREFIX_ONCE = 0x0, + DIAGNOSTICS_SHOW_PREFIX_NEVER = 0x1, + DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE = 0x2 +} diagnostic_prefixing_rule_t; + + + + + + +struct chunk_info +{ + + struct chunk_info *prev; + + + + + + + + const char *args[30 * 2]; +}; + + + +typedef struct +{ + + struct obstack formatted_obstack; + + + + struct obstack chunk_obstack; + + + + struct obstack *obstack; + + + struct chunk_info *cur_chunk_array; + + + FILE *stream; + + + int line_length; + + + + char digit_buffer[128]; +} output_buffer; + + +typedef unsigned int pp_flags; + +typedef enum +{ + pp_none, pp_before, pp_after +} pp_padding; + + + +typedef struct +{ + + diagnostic_prefixing_rule_t rule; + + + + int line_cutoff; +} pp_wrapping_mode_t; +# 133 "../../GCC/gcc/pretty-print.h" +typedef struct pretty_print_info pretty_printer; +typedef unsigned char (*printer_fn) (pretty_printer *, text_info *, const char *, + int, unsigned char, unsigned char, unsigned char); +# 153 "../../GCC/gcc/pretty-print.h" +struct pretty_print_info +{ + + output_buffer *buffer; + + + const char *prefix; + + + pp_padding padding; + + + + int maximum_length; + + + int indent_skip; + + + pp_wrapping_mode_t wrapping; +# 182 "../../GCC/gcc/pretty-print.h" + printer_fn format_decoder; + + + unsigned char emitted_prefix; + + + unsigned char need_newline; +}; +# 290 "../../GCC/gcc/pretty-print.h" +extern void pp_construct (pretty_printer *, const char *, int); +extern void pp_base_set_line_maximum_length (pretty_printer *, int); +extern void pp_base_set_prefix (pretty_printer *, const char *); +extern void pp_base_destroy_prefix (pretty_printer *); +extern int pp_base_remaining_character_count_for_line (pretty_printer *); +extern void pp_base_clear_output_area (pretty_printer *); +extern const char *pp_base_formatted_text (pretty_printer *); +extern const char *pp_base_last_position_in_text (const pretty_printer *); +extern void pp_base_emit_prefix (pretty_printer *); +extern void pp_base_append_text (pretty_printer *, const char *, const char *); +# 308 "../../GCC/gcc/pretty-print.h" +extern void pp_printf (pretty_printer *, const char *, ...) + __attribute__ ((__format__ (__gcc_diag__, 2 ,3))) __attribute__ ((__nonnull__ (2))); + +extern void pp_verbatim (pretty_printer *, const char *, ...) + __attribute__ ((__format__ (__gcc_diag__, 2 ,3))) __attribute__ ((__nonnull__ (2))); +extern void pp_base_flush (pretty_printer *); +extern void pp_base_format (pretty_printer *, text_info *); +extern void pp_base_output_formatted_text (pretty_printer *); +extern void pp_base_format_verbatim (pretty_printer *, text_info *); + +extern void pp_base_indent (pretty_printer *); +extern void pp_base_newline (pretty_printer *); +extern void pp_base_character (pretty_printer *, int); +extern void pp_base_string (pretty_printer *, const char *); +extern void pp_write_text_to_stream (pretty_printer *pp); +extern void pp_base_maybe_space (pretty_printer *); + + +static __inline__ pp_wrapping_mode_t +pp_set_verbatim_wrapping_ (pretty_printer *pp) +{ + pp_wrapping_mode_t oldmode = (pp)->wrapping; + (pp)->wrapping.line_cutoff = 0; + (pp)->wrapping.rule = DIAGNOSTICS_SHOW_PREFIX_NEVER; + return oldmode; +} +# 26 "../../GCC/gcc/diagnostic.h" 2 +# 1 "./options.h" 1 +# 27 "../../GCC/gcc/diagnostic.h" 2 + + +typedef enum +{ + +# 1 "../../GCC/gcc/diagnostic.def" 1 + + + + + + +DK_UNSPECIFIED, + + + + +DK_IGNORED, + + +DK_FATAL, +DK_ICE, +DK_ERROR, +DK_SORRY, +DK_WARNING, +DK_ANACHRONISM, +DK_NOTE, +DK_DEBUG, +# 33 "../../GCC/gcc/diagnostic.h" 2 + + DK_LAST_DIAGNOSTIC_KIND +} diagnostic_t; + + + + +typedef struct +{ + text_info message; + location_t location; + + diagnostic_t kind; + + int option_index; +} diagnostic_info; + + + + + +typedef struct diagnostic_context diagnostic_context; +typedef void (*diagnostic_starter_fn) (diagnostic_context *, + diagnostic_info *); +typedef diagnostic_starter_fn diagnostic_finalizer_fn; + + + +struct diagnostic_context +{ + + pretty_printer *printer; + + + int diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]; + + + + unsigned char issue_warnings_are_errors_message; + + + unsigned char warning_as_error_requested; + + + + + + + char classify_diagnostic[N_OPTS]; + + + + unsigned char show_option_requested; + + + unsigned char abort_on_error; +# 97 "../../GCC/gcc/diagnostic.h" + diagnostic_starter_fn begin_diagnostic; + + + diagnostic_finalizer_fn end_diagnostic; + + + void (*internal_error) (const char *, va_list *); + + + + + tree last_function; + + + int last_module; + + int lock; +}; +# 165 "../../GCC/gcc/diagnostic.h" +extern diagnostic_context *global_dc; +# 186 "../../GCC/gcc/diagnostic.h" +extern void diagnostic_initialize (diagnostic_context *); +extern void diagnostic_report_current_module (diagnostic_context *); +extern void diagnostic_report_current_function (diagnostic_context *); + + +extern diagnostic_t diagnostic_classify_diagnostic (diagnostic_context *, + int , + diagnostic_t ); +extern void diagnostic_report_diagnostic (diagnostic_context *, + diagnostic_info *); + +extern void diagnostic_set_info (diagnostic_info *, const char *, va_list *, + location_t, diagnostic_t) __attribute__ ((__format__ (__gcc_cdiag__, 2, 0))) __attribute__ ((__nonnull__ (2))); +extern void diagnostic_set_info_translated (diagnostic_info *, const char *, + va_list *, location_t, + diagnostic_t) + __attribute__ ((__format__ (__gcc_cdiag__, 2, 0))) __attribute__ ((__nonnull__ (2))); + +extern char *diagnostic_build_prefix (diagnostic_info *); + + +extern char *file_name_as_prefix (const char *); + + +extern int dump_generic_node (pretty_printer *, tree, int, int, unsigned char); +extern void print_generic_stmt (FILE *, tree, int); +extern void print_generic_stmt_indented (FILE *, tree, int, int); +extern void print_generic_expr (FILE *, tree, int); +extern void print_generic_decl (FILE *, tree, int); + +extern void debug_generic_expr (tree); +extern void debug_generic_stmt (tree); +extern void debug_tree_chain (tree); +extern void debug_c_tree (tree); +# 27 "../../GCC/gcc/c-tree.h" 2 +# 35 "../../GCC/gcc/c-tree.h" +struct lang_decl +{ + char dummy; +}; +# 59 "../../GCC/gcc/c-tree.h" +struct lang_type +{ + + struct sorted_fields_type * s; + + tree enum_min; + tree enum_max; + + + + tree objc_info; +}; +# 150 "../../GCC/gcc/c-tree.h" +struct c_expr +{ + + tree value; + + + + + enum tree_code original_code; +}; + + + + +enum c_typespec_kind { + + ctsk_resword, + + + + + ctsk_tagref, + + + ctsk_tagfirstref, + + ctsk_tagdef, + + ctsk_typedef, + + ctsk_objc, + + ctsk_typeof +}; + + + +struct c_typespec { + + enum c_typespec_kind kind; + + tree spec; +}; + + +enum c_storage_class { + csc_none, + csc_auto, + csc_extern, + csc_register, + csc_static, + csc_typedef +}; + + + +enum c_typespec_keyword { + cts_none, + cts_void, + cts_bool, + cts_char, + cts_int, + cts_float, + cts_double, + + cts_CbC_code, + + cts_dfloat32, + cts_dfloat64, + cts_dfloat128 +}; + + +struct c_declspecs { + + + + + tree type; + + tree decl_attr; + + + + tree attrs; + + + enum c_typespec_keyword typespec_word; + + enum c_storage_class storage_class; + + unsigned int declspecs_seen_p : 1; + + unsigned int type_seen_p : 1; + + + + + + + unsigned int non_sc_seen_p : 1; + + unsigned int typedef_p : 1; + + + + unsigned int tag_defined_p : 1; + + + unsigned int explicit_signed_p : 1; + + unsigned int deprecated_p : 1; + + + unsigned int default_int_p; + + unsigned int long_p : 1; + + unsigned int long_long_p : 1; + + unsigned int short_p : 1; + + unsigned int signed_p : 1; + + unsigned int unsigned_p : 1; + + unsigned int complex_p : 1; + + unsigned int inline_p : 1; + + unsigned int thread_p : 1; + + unsigned int const_p : 1; + + unsigned int volatile_p : 1; + + unsigned int restrict_p : 1; +}; + + +enum c_declarator_kind { + + cdk_id, + + cdk_function, + + cdk_array, + + cdk_pointer, + + cdk_attrs +}; + + +struct c_arg_info { + + tree parms; + + tree tags; + + tree types; + + + tree others; + + + + + tree pending_sizes; + + unsigned int had_vla_unspec : 1; +}; + + +struct c_declarator { + + enum c_declarator_kind kind; + + struct c_declarator *declarator; + location_t id_loc; + union { + + + tree id; + + struct c_arg_info *arg_info; + + struct { + + tree dimen; + + int quals; + + tree attrs; + + unsigned int static_p : 1; + + unsigned int vla_unspec_p : 1; + } array; + + int pointer_quals; + + tree attrs; + } u; +}; + + +struct c_type_name { + + struct c_declspecs *specs; + + struct c_declarator *declarator; +}; + + +struct c_parm { + + struct c_declspecs *specs; + + tree attrs; + + struct c_declarator *declarator; +}; + + + + + +struct language_function +{ + struct c_language_function base; + tree x_break_label; + tree x_cont_label; + struct c_switch * x_switch_stack; + struct c_arg_info * arg_info; + int returns_value; + int returns_null; + int returns_abnormally; + int warn_about_return_type; + int extern_inline; +}; + + + + +struct c_label_list +{ + + tree label; + + struct c_label_list *next; +}; + + + +struct c_label_context_se +{ + + struct c_label_list *labels_def; + + struct c_label_list *labels_used; + + struct c_label_context_se *next; +}; + + + +struct c_label_context_vm +{ + + struct c_label_list *labels_def; + + struct c_label_list *labels_used; + + + + unsigned scope; + + struct c_label_context_vm *next; +}; + + + +extern void c_parse_init (void); + + +extern void gen_aux_info_record (tree, int, int, int); + + +extern struct obstack parser_obstack; +extern tree c_break_label; +extern tree c_cont_label; + +extern int global_bindings_p (void); +extern void push_scope (void); +extern tree pop_scope (void); +extern void insert_block (tree); +extern void c_expand_body (tree); + +extern void c_init_decl_processing (void); +extern void c_dup_lang_specific_decl (tree); +extern void c_print_identifier (FILE *, tree, int); +extern int quals_from_declspecs (const struct c_declspecs *); +extern struct c_declarator *build_array_declarator (tree, struct c_declspecs *, + unsigned char, unsigned char); +extern tree build_enumerator (tree, tree); +extern tree check_for_loop_decls (void); +extern void mark_forward_parm_decls (void); +extern void declare_parm_level (void); +extern void undeclared_variable (tree, location_t); +extern tree declare_label (tree); +extern tree define_label (location_t, tree); +extern void c_maybe_initialize_eh (void); +extern void finish_decl (tree, tree, tree); +extern tree finish_enum (tree, tree, tree); +extern void finish_function (void); +extern tree finish_struct (tree, tree, tree); +extern struct c_arg_info *get_parm_info (unsigned char); +extern tree grokfield (struct c_declarator *, struct c_declspecs *, tree); +extern tree groktypename (struct c_type_name *); +extern tree grokparm (const struct c_parm *); +extern tree implicitly_declare (tree); +extern void keep_next_level (void); +extern void pending_xref_error (void); +extern void c_push_function_context (struct function *); +extern void c_pop_function_context (struct function *); +extern void push_parm_decl (const struct c_parm *); +extern struct c_declarator *set_array_declarator_inner (struct c_declarator *, + struct c_declarator *, + unsigned char); +extern tree builtin_function (const char *, tree, int, enum built_in_class, + const char *, tree); +extern void shadow_tag (const struct c_declspecs *); +extern void shadow_tag_warned (const struct c_declspecs *, int); +extern tree start_enum (tree); +extern int start_function (struct c_declspecs *, struct c_declarator *, tree); +extern tree start_decl (struct c_declarator *, struct c_declspecs *, unsigned char, + tree); +extern tree start_struct (enum tree_code, tree); +extern void store_parm_decls (void); +extern void store_parm_decls_from (struct c_arg_info *); +extern tree xref_tag (enum tree_code, tree); +extern struct c_typespec parser_xref_tag (enum tree_code, tree); +extern int c_expand_decl (tree); +extern struct c_parm *build_c_parm (struct c_declspecs *, tree, + struct c_declarator *); +extern struct c_declarator *build_attrs_declarator (tree, + struct c_declarator *); +extern struct c_declarator *build_function_declarator (struct c_arg_info *, + struct c_declarator *); +extern struct c_declarator *build_id_declarator (tree); +extern struct c_declarator *make_pointer_declarator (struct c_declspecs *, + struct c_declarator *); +extern struct c_declspecs *build_null_declspecs (void); +extern struct c_declspecs *declspecs_add_qual (struct c_declspecs *, tree); +extern struct c_declspecs *declspecs_add_type (struct c_declspecs *, + struct c_typespec); +extern struct c_declspecs *declspecs_add_scspec (struct c_declspecs *, tree); +extern struct c_declspecs *declspecs_add_attrs (struct c_declspecs *, tree); +extern struct c_declspecs *finish_declspecs (struct c_declspecs *); + + +extern int c_disregard_inline_limits (tree); +extern int c_cannot_inline_tree_fn (tree *); +extern unsigned char c_objc_common_init (void); +extern unsigned char c_missing_noreturn_ok_p (tree); +extern tree c_objc_common_truthvalue_conversion (tree expr); +extern unsigned char c_warn_unused_global_decl (tree); +extern void c_initialize_diagnostics (diagnostic_context *); +extern unsigned char c_vla_unspec_p (tree x, tree fn); + + + + + + + +extern int in_alignof; +extern int in_sizeof; +extern int in_typeof; + +extern struct c_switch *c_switch_stack; +extern struct c_label_context_se *label_context_stack_se; +extern struct c_label_context_vm *label_context_stack_vm; + +extern tree require_complete_type (tree); +extern int same_translation_unit_p (tree, tree); +extern int comptypes (tree, tree); +extern unsigned char c_vla_type_p (tree); +extern unsigned char c_mark_addressable (tree); +extern void c_incomplete_type_error (tree, tree); +extern tree c_type_promotes_to (tree); +extern struct c_expr default_function_array_conversion (struct c_expr); +extern tree composite_type (tree, tree); +extern tree build_component_ref (tree, tree); +extern tree build_array_ref (tree, tree); +extern tree build_external_ref (tree, int, location_t); +extern void pop_maybe_used (unsigned char); +extern struct c_expr c_expr_sizeof_expr (struct c_expr); +extern struct c_expr c_expr_sizeof_type (struct c_type_name *); +extern struct c_expr parser_build_unary_op (enum tree_code, struct c_expr); +extern struct c_expr parser_build_binary_op (enum tree_code, struct c_expr, + struct c_expr); +extern tree build_conditional_expr (tree, tree, tree); +extern tree build_compound_expr (tree, tree); +extern tree c_cast_expr (struct c_type_name *, tree); +extern tree build_c_cast (tree, tree); +extern void store_init_value (tree, tree); +extern void error_init (const char *); +extern void pedwarn_init (const char *); +extern void maybe_warn_string_init (tree, struct c_expr); +extern void start_init (tree, tree, int); +extern void finish_init (void); +extern void really_start_incremental_init (tree); +extern void push_init_level (int); +extern struct c_expr pop_init_level (int); +extern void set_init_index (tree, tree); +extern void set_init_label (tree); +extern void process_init_element (struct c_expr); +extern tree build_compound_literal (tree, tree); +extern tree c_start_case (tree); +extern void c_finish_case (tree); +extern tree build_asm_expr (tree, tree, tree, tree, unsigned char); +extern tree build_asm_stmt (tree, tree); +extern tree c_convert_parm_for_inlining (tree, tree, tree, int); +extern int c_types_compatible_p (tree, tree); +extern tree c_begin_compound_stmt (unsigned char); +extern tree c_end_compound_stmt (tree, unsigned char); +extern void c_finish_if_stmt (location_t, tree, tree, tree, unsigned char); +extern void c_finish_loop (location_t, tree, tree, tree, tree, tree, unsigned char); +extern tree c_begin_stmt_expr (void); +extern tree c_finish_stmt_expr (tree); +extern tree c_process_expr_stmt (tree); +extern tree c_finish_expr_stmt (tree); +extern tree c_finish_return (tree); +extern tree c_finish_bc_stmt (tree *, unsigned char); +extern tree c_finish_goto_label (tree); +extern tree c_finish_goto_ptr (tree); +extern void c_begin_vm_scope (unsigned int); +extern void c_end_vm_scope (unsigned int); +extern tree c_expr_to_decl (tree, unsigned char *, unsigned char *, unsigned char *); +extern tree c_begin_omp_parallel (void); +extern tree c_finish_omp_parallel (tree, tree); +extern tree c_finish_omp_clauses (tree); + + + + +extern int current_function_returns_value; + + + + +extern int current_function_returns_null; + + + + +extern int current_function_returns_abnormally; + + + +extern int system_header_p; + + + + +extern unsigned char c_override_global_bindings_to_false; + + +extern unsigned char c_eh_initialized_p; + + +extern void c_finish_incomplete_decl (tree); +extern void c_write_global_declarations (void); +# 635 "../../GCC/gcc/c-tree.h" +extern void pedwarn_c90 (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1 ,2))) __attribute__ ((__nonnull__ (1))); +extern void pedwarn_c99 (const char *, ...) __attribute__ ((__format__ (__gcc_cdiag__, 1 ,2))) __attribute__ ((__nonnull__ (1))); +# 51 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/flags.h" 1 +# 27 "../../GCC/gcc/flags.h" +enum debug_info_type +{ + NO_DEBUG, + DBX_DEBUG, + SDB_DEBUG, + DWARF2_DEBUG, + XCOFF_DEBUG, + VMS_DEBUG, + VMS_AND_DWARF2_DEBUG + +}; + + +extern enum debug_info_type write_symbols; + + +extern const char *const debug_type_names[]; + +enum debug_info_level +{ + DINFO_LEVEL_NONE, + DINFO_LEVEL_TERSE, + DINFO_LEVEL_NORMAL, + DINFO_LEVEL_VERBOSE +}; + + +extern enum debug_info_level debug_info_level; + + + +extern unsigned char use_gnu_debug_info_extensions; +# 74 "../../GCC/gcc/flags.h" +extern enum symbol_visibility default_visibility; + +struct visibility_flags +{ + unsigned inpragma : 1; + unsigned inlines_hidden : 1; +}; + + +extern struct visibility_flags visibility_options; + + + +extern int optimize; + + + +extern int optimize_size; + + + + +extern unsigned char extra_warnings; + + + + + +extern void set_Wunused (int setting); + + + + + +extern unsigned char warn_larger_than; +extern long larger_than_size; + + + + +extern int warn_strict_aliasing; + + + + +extern int warn_strict_overflow; + + + + +extern int in_system_header; + + + + +extern int flag_print_asm_name; + + + + + +extern int flag_signed_char; + + + + +extern int flag_short_enums; + + + +extern int flag_pcc_struct_return; + + + + + +extern int flag_complex_method; + + + + +extern int flag_really_no_inline; + + + +extern int rtl_dump_and_exit; + + + +extern int flag_gen_aux_info; + + + + +extern int flag_dump_unnumbered; + + + + +extern int flag_pedantic_errors; + + + + +extern int flag_shlib; +# 187 "../../GCC/gcc/flags.h" +extern int flag_debug_asm; + + + +extern int flag_next_runtime; + +extern int flag_dump_rtl_in_asm; + + + + +extern int flag_renumber_insns; + + + + + + + +extern int frame_pointer_needed; + + +extern int flag_evaluation_order; + + +extern unsigned long g_switch_value; +extern unsigned char g_switch_set; + + + + + + +extern int align_loops_log; +extern int align_loops_max_skip; +extern int align_jumps_log; +extern int align_jumps_max_skip; +extern int align_labels_log; +extern int align_labels_max_skip; +extern int align_functions_log; + + + +extern int force_align_functions_log; + + +extern int dump_for_graph; + + +enum graph_dump_types +{ + no_graph = 0, + vcg +}; +extern enum graph_dump_types graph_dump_format; + + + +extern int flag_detailed_statistics; + + + +extern int flag_remove_unreachable_functions; + + +extern int flag_var_tracking; + + + +extern unsigned char flag_speculative_prefetching_set; + + + + +extern const char *flag_random_seed; +# 319 "../../GCC/gcc/flags.h" +enum warn_strict_overflow_code +{ + + + + WARN_STRICT_OVERFLOW_ALL = 1, + + + + + WARN_STRICT_OVERFLOW_CONDITIONAL = 2, + + + WARN_STRICT_OVERFLOW_COMPARISON = 3, + + + WARN_STRICT_OVERFLOW_MISC = 4, + + + WARN_STRICT_OVERFLOW_MAGNITUDE = 5 +}; +# 52 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/output.h" 1 +# 27 "../../GCC/gcc/output.h" +extern void init_final (const char *); + + + +extern void app_enable (void); + + + +extern void app_disable (void); + + + + +extern int dbr_sequence_length (void); + + +extern void init_insn_lengths (void); + + + +extern int get_attr_length (rtx); + + + +extern int get_attr_min_length (rtx); + + + +extern void shorten_branches (rtx); + + + + + + +extern void final_start_function (rtx, FILE *, int); + + + + +extern void final_end_function (void); + + +extern void final (rtx, FILE *, int); + + + + +extern rtx final_scan_insn (rtx, FILE *, int, int, int *); + + + +extern rtx alter_subreg (rtx *); + + + +extern void output_operand_lossage (const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))) __attribute__ ((__nonnull__ (1))); + + + +extern void output_asm_insn (const char *, rtx *); + + + + +extern int insn_current_reference_address (rtx); + + + +extern int label_to_alignment (rtx); + + +extern void output_asm_label (rtx); + + + +extern void output_address (rtx); + + + + +extern void output_addr_const (FILE *, rtx); +# 117 "../../GCC/gcc/output.h" +typedef long __gcc_host_wide_int__; + + + + +extern void asm_fprintf (FILE *file, const char *p, ...) + __attribute__ ((__format__ (__asm_fprintf__, 2, 3))) __attribute__ ((__nonnull__ (2))); + + + +extern void split_double (rtx, rtx *, rtx *); + + +extern int leaf_function_p (void); + + + + +extern int final_forward_branch_p (rtx); + + + +extern int only_leaf_regs_used (void); + + + +extern void leaf_renumber_regs_insn (rtx); + + +extern const char *get_insn_template (int, rtx); + + +extern int regno_clobbered_at_setjmp (int); + + + + +extern void declare_weak (tree); + +extern void merge_weak (tree, tree); + + +extern void weak_finish (void); +# 168 "../../GCC/gcc/output.h" +extern int decode_reg_name (const char *); + +extern void assemble_alias (tree, tree); + +extern void default_assemble_visibility (tree, int); + + + +extern void assemble_asm (tree); + + + + + +extern void assemble_start_function (tree, const char *); + + + +extern void assemble_end_function (tree, const char *); +# 197 "../../GCC/gcc/output.h" +extern void assemble_variable (tree, int, int, int); + + + +extern void align_variable (tree decl, unsigned char dont_output_data); + + + + +extern void assemble_external (tree); + + +extern void assemble_zeros (unsigned long); + + +extern void assemble_align (int); + + +extern void assemble_string (const char *, int); + + +extern void assemble_external_libcall (rtx); + + +extern void assemble_label (const char *); + + + + + +extern void assemble_name_raw (FILE *, const char *); + + + + + +extern void assemble_name (FILE *, const char *); +# 242 "../../GCC/gcc/output.h" +extern const char *integer_asm_op (int, int); + + + +extern void assemble_integer_with_op (const char *, rtx); + + +extern unsigned char default_assemble_integer (rtx, unsigned int, int); + + + + + +extern unsigned char assemble_integer (rtx, unsigned, unsigned, int); +# 265 "../../GCC/gcc/output.h" +extern void assemble_real (struct real_value, enum machine_mode, unsigned); + + + +extern int get_pool_size (void); + + + + + +extern void output_shared_constant_pool (void); + +extern void output_object_blocks (void); + + + + + + +extern unsigned char constructor_static_from_elts_p (tree); +# 295 "../../GCC/gcc/output.h" +extern tree initializer_constant_valid_p (tree, tree); +# 305 "../../GCC/gcc/output.h" +extern void output_constant (tree, unsigned long, unsigned int); + + + + + + + +extern rtx final_sequence; +# 325 "../../GCC/gcc/output.h" +extern FILE *asm_out_file; + + + +extern const char *first_global_object_name; + + +extern const char *weak_global_object_name; + + + + + + +extern int current_function_is_leaf; + + + + + +extern int current_function_sp_is_unchanging; + + + + + +extern int current_function_uses_only_leaf_regs; + + + + +extern FILE *dump_file; + + + +extern rtx current_insn_predicate; + + +extern rtx current_output_insn; + + + + +extern rtx this_is_asm_operands; + + + +extern int size_directive_output; +extern tree last_assemble_variable_decl; + +extern unsigned char first_function_block_is_cold; + + + +extern unsigned char decl_readonly_section (tree, int); + + + +extern int compute_reloc_for_constant (tree); + + +extern const char *user_label_prefix; + + +extern void default_function_pro_epilogue (FILE *, long); + + +extern void no_asm_to_stream (FILE *); +# 430 "../../GCC/gcc/output.h" +enum section_category +{ + SECCAT_TEXT, + + SECCAT_RODATA, + SECCAT_RODATA_MERGE_STR, + SECCAT_RODATA_MERGE_STR_INIT, + SECCAT_RODATA_MERGE_CONST, + SECCAT_SRODATA, + + SECCAT_DATA, +# 451 "../../GCC/gcc/output.h" + SECCAT_DATA_REL, + SECCAT_DATA_REL_LOCAL, + SECCAT_DATA_REL_RO, + SECCAT_DATA_REL_RO_LOCAL, + + SECCAT_SDATA, + SECCAT_TDATA, + + SECCAT_BSS, + SECCAT_SBSS, + SECCAT_TBSS +}; + + +struct section_common { + + unsigned int flags; +}; + + +struct named_section { + struct section_common common; + + + const char *name; + + + + tree decl; +}; + + + +typedef void (*unnamed_section_callback) (const void *); + + +struct unnamed_section { + struct section_common common; + + + + unnamed_section_callback callback; + const void * data; + + + section *next; +}; +# 508 "../../GCC/gcc/output.h" +typedef unsigned char (*noswitch_section_callback) (tree decl, const char *name, + unsigned long size, + unsigned long rounded); + + +struct noswitch_section { + struct section_common common; + + + noswitch_section_callback callback; +}; + + +union section +{ + struct section_common common; + struct named_section named; + struct unnamed_section unnamed; + struct noswitch_section noswitch; +}; + + + + +struct object_block; + + +extern section *text_section; +extern section *data_section; +extern section *readonly_data_section; +extern section *sdata_section; +extern section *ctors_section; +extern section *dtors_section; +extern section *bss_section; +extern section *sbss_section; +extern section *exception_section; +extern section *eh_frame_section; +extern section *tls_comm_section; +extern section *comm_section; +extern section *lcomm_section; +extern section *bss_noswitch_section; + +extern section *in_section; +extern unsigned char in_cold_section_p; + +extern section *get_unnamed_section (unsigned int, void (*) (const void *), + const void *); +extern section *get_section (const char *, unsigned int, tree); +extern section *get_named_section (tree, const char *, int); +extern void place_block_symbol (rtx); +extern rtx get_section_anchor (struct object_block *, long, + enum tls_model); +extern section *mergeable_constant_section (enum machine_mode, + unsigned long, + unsigned int); +extern section *function_section (tree); +extern section *unlikely_text_section (void); +extern section *current_function_section (void); + +extern unsigned char unlikely_text_section_p (section *); +extern void switch_to_section (section *); +extern void output_section_asm_op (const void *); + +extern unsigned int default_section_type_flags (tree, const char *, int); + +extern unsigned char have_global_bss_p (void); +extern void default_no_named_section (const char *, unsigned int, tree); +extern void default_elf_asm_named_section (const char *, unsigned int, tree); +extern enum section_category categorize_decl_for_section (tree, int); +extern void default_coff_asm_named_section (const char *, unsigned int, tree); +extern void default_pe_asm_named_section (const char *, unsigned int, tree); + +extern void default_stabs_asm_out_destructor (rtx, int); +extern void default_named_section_asm_out_destructor (rtx, int); +extern void default_dtor_section_asm_out_destructor (rtx, int); +extern void default_stabs_asm_out_constructor (rtx, int); +extern void default_named_section_asm_out_constructor (rtx, int); +extern void default_ctor_section_asm_out_constructor (rtx, int); + +extern section *default_select_section (tree, int, unsigned long); +extern section *default_elf_select_section (tree, int, unsigned long); +extern void default_unique_section (tree, int); +extern section *default_function_rodata_section (tree); +extern section *default_no_function_rodata_section (tree); +extern section *default_select_rtx_section (enum machine_mode, rtx, + unsigned long); +extern section *default_elf_select_rtx_section (enum machine_mode, rtx, + unsigned long); +extern void default_encode_section_info (tree, rtx, int); +extern const char *default_strip_name_encoding (const char *); +extern void default_asm_output_anchor (rtx); +extern unsigned char default_use_anchors_for_symbol_p (rtx); +extern unsigned char default_binds_local_p (tree); +extern unsigned char default_binds_local_p_1 (tree, int); +extern void default_globalize_label (FILE *, const char *); +extern void default_emit_unwind_label (FILE *, tree, int, int); +extern void default_emit_except_table_label (FILE *); +extern void default_internal_label (FILE *, const char *, unsigned long); +extern void default_file_start (void); +extern void file_end_indicate_exec_stack (void); +extern unsigned char default_valid_pointer_mode (enum machine_mode); + +extern int default_address_cost (rtx); + + + + +extern void dbxout_int (int); +extern void dbxout_stabd (int, int); +extern void dbxout_begin_stabn (int); +extern void dbxout_begin_stabn_sline (int); +extern void dbxout_begin_empty_stabs (int); +extern void dbxout_begin_simple_stabs (const char *, int); +extern void dbxout_begin_simple_stabs_desc (const char *, int, int); + +extern void dbxout_stab_value_zero (void); +extern void dbxout_stab_value_label (const char *); +extern void dbxout_stab_value_label_diff (const char *, const char *); +extern void dbxout_stab_value_internal_label (const char *, int *); +extern void dbxout_stab_value_internal_label_diff (const char *, int *, + const char *); +# 53 "../../GCC/gcc/c-parser.c" 2 + + + + +# 1 "../../GCC/gcc/target.h" 1 +# 55 "../../GCC/gcc/target.h" +struct stdarg_info; +struct spec_info_def; + + +typedef struct secondary_reload_info +{ + + + int icode; + int extra_cost; + + + + struct secondary_reload_info *prev_sri; + int t_icode; +} secondary_reload_info; + + +struct gcc_target +{ + + struct asm_out + { + + const char *open_paren, *close_paren; + + + const char *byte_op; + struct asm_int_op + { + const char *hi; + const char *si; + const char *di; + const char *ti; + } aligned_op, unaligned_op; + + + + + + + unsigned char (* integer) (rtx x, unsigned int size, int aligned_p); + + + void (* globalize_label) (FILE *, const char *); + + + + + + + void (* unwind_label) (FILE *, tree, int, int); + + + + void (* except_table_label) (FILE *); + + + void (* unwind_emit) (FILE *, rtx); + + + void (* internal_label) (FILE *, const char *, unsigned long); + + + unsigned char (* ttype) (rtx); + + + + void (* visibility) (tree, int); + + + void (* function_prologue) (FILE *, long); + + + void (* function_end_prologue) (FILE *); + + + void (* function_begin_epilogue) (FILE *); + + + void (* function_epilogue) (FILE *, long); + + + void (* init_sections) (void); + + + + + void (* named_section) (const char *name, unsigned int flags, tree decl); + + + + + + int (*reloc_rw_mask) (void); + + + + + + section *(* select_section) (tree, int, unsigned long); + + + + section *(* select_rtx_section) (enum machine_mode, rtx, + unsigned long); + + + + void (* unique_section) (tree, int); + + + section *(* function_rodata_section) (tree); + + + void (* constructor) (rtx, int); + + + void (* destructor) (rtx, int); + + + + + + + void (* output_mi_thunk) (FILE *file, tree thunk_decl, + long delta, long vcall_offset, + tree function_decl); + + + + + + + + unsigned char (* can_output_mi_thunk) (tree thunk_decl, long delta, + long vcall_offset, + tree function_decl); + + + + void (*file_start) (void); + + + + void (*file_end) (void); + + + + void (*external_libcall) (rtx); + + + + void (*mark_decl_preserved) (const char *); + + + void (*output_anchor) (rtx); + + + void (*output_dwarf_dtprel) (FILE *file, int size, rtx x); + + } asm_out; + + + struct sched + { + + + + int (* adjust_cost) (rtx insn, rtx link, rtx def_insn, int cost); + + + + int (* adjust_priority) (rtx, int); + + + + + int (* issue_rate) (void); + + + + int (* variable_issue) (FILE *, int, rtx, int); + + + void (* md_init) (FILE *, int, int); + + + void (* md_finish) (FILE *, int); + + + void (* md_init_global) (FILE *, int, int); + + + void (* md_finish_global) (FILE *, int); + + + + int (* reorder) (FILE *, int, rtx *, int *, int); + int (* reorder2) (FILE *, int, rtx *, int *, int); + + + + + void (* dependencies_evaluation_hook) (rtx, rtx); +# 272 "../../GCC/gcc/target.h" + void (* init_dfa_pre_cycle_insn) (void); + rtx (* dfa_pre_cycle_insn) (void); + void (* init_dfa_post_cycle_insn) (void); + rtx (* dfa_post_cycle_insn) (void); +# 284 "../../GCC/gcc/target.h" + int (* first_cycle_multipass_dfa_lookahead) (void); + + + + + + + int (* first_cycle_multipass_dfa_lookahead_guard) (rtx); +# 305 "../../GCC/gcc/target.h" + int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *); +# 317 "../../GCC/gcc/target.h" + unsigned char (* is_costly_dependence) (rtx, rtx, rtx, int, int); + + + + + int (* adjust_cost_2) (rtx insn, int, rtx def_insn, int cost); + + + + + void (* h_i_d_extended) (void); +# 340 "../../GCC/gcc/target.h" + int (* speculate_insn) (rtx, int, rtx *); + + + + + + unsigned char (* needs_block_p) (rtx); +# 356 "../../GCC/gcc/target.h" + rtx (* gen_check) (rtx, rtx, unsigned char); + + + + + + + + unsigned char (* first_cycle_multipass_dfa_lookahead_guard_spec) (rtx); + + + + + void (* set_sched_flags) (struct spec_info_def *); + } sched; + + + struct vectorize + { + + + + tree (* builtin_mask_for_load) (void); + + + + unsigned char (* vector_alignment_reachable) (tree, unsigned char); + } vectorize; + + + int default_target_flags; + + + + + + + unsigned char (* handle_option) (size_t code, const char *arg, int value); + + + enum machine_mode (* eh_return_filter_mode) (void); + + + tree (* merge_decl_attributes) (tree, tree); + + + tree (* merge_type_attributes) (tree, tree); + + + + const struct attribute_spec *attribute_table; + + + + + int (* comp_type_attributes) (tree type1, tree type2); + + + void (* set_default_type_attributes) (tree type); + + + void (* insert_attributes) (tree decl, tree *attributes); + + + + unsigned char (* function_attribute_inlinable_p) (tree fndecl); + + + + unsigned char (* ms_bitfield_layout_p) (tree record_type); + + + unsigned char (* decimal_float_supported_p) (void); + + + unsigned char (* align_anon_bitfield) (void); + + + + unsigned char (* narrow_volatile_bitfield) (void); + + + void (* init_builtins) (void); + + + rtx (* expand_builtin) (tree exp, rtx target, rtx subtarget, + enum machine_mode mode, int ignore); + + + + + + tree (*resolve_overloaded_builtin) (tree decl, tree params); + + + tree (* fold_builtin) (tree fndecl, tree arglist, unsigned char ignore); + + + + + const char * (* mangle_fundamental_type) (tree type); + + + void (* init_libfuncs) (void); + + + + + unsigned int (* section_type_flags) (tree, const char *, int); + + + + unsigned char (* cannot_modify_jumps_p) (void); + + + + int (* branch_target_register_class) (void); + + + + + + unsigned char (* branch_target_register_callee_saved) (unsigned char after_pe_gen); + + + unsigned char (* cannot_force_const_mem) (rtx); + + + unsigned char (* cannot_copy_insn_p) (rtx); + + + unsigned char (* commutative_p) (rtx, int); + + + rtx (* delegitimize_address) (rtx); + + + unsigned char (* use_blocks_for_constant_p) (enum machine_mode, rtx); + + + long min_anchor_offset; + long max_anchor_offset; + + + unsigned char (* use_anchors_for_symbol_p) (rtx); + + + + + unsigned char (*function_ok_for_sibcall) (tree decl, tree exp); + + + unsigned char (* in_small_data_p) (tree); + + + + unsigned char (* binds_local_p) (tree); + + + + void (* encode_section_info) (tree, rtx, int); + + + const char * (* strip_name_encoding) (const char *); + + + + unsigned long (* shift_truncation_mask) (enum machine_mode mode); + + + + + unsigned int (* min_divisions_for_recip_mul) (enum machine_mode mode); + + + + + + + int (* mode_rep_extended) (enum machine_mode mode, + enum machine_mode mode_rep); + + + unsigned char (* valid_pointer_mode) (enum machine_mode mode); + + + + + unsigned char (* scalar_mode_supported_p) (enum machine_mode mode); + + + + + unsigned char (* vector_mode_supported_p) (enum machine_mode mode); + + + unsigned char (* vector_opaque_p) (tree); + + + + + + + unsigned char (* rtx_costs) (rtx x, int code, int outer_code, int *total); + + + + int (* address_cost) (rtx x); + + + + rtx (* allocate_initial_value) (rtx x); + + + + + + + + rtx (* dwarf_register_span) (rtx); +# 584 "../../GCC/gcc/target.h" + unsigned char (* fixed_condition_code_regs) (unsigned int *, unsigned int *); + + + + + + + enum machine_mode (* cc_modes_compatible) (enum machine_mode, + enum machine_mode); + + + + void (* machine_dependent_reorg) (void); + + + tree (* build_builtin_va_list) (void); + + + tree (* gimplify_va_arg_expr) (tree valist, tree type, tree *pre_p, + tree *post_p); + + + + + + + + void * (* get_pch_validity) (size_t *); + const char * (* pch_valid_p) (const void *, size_t); + + + + + const char *(*check_pch_target_flags) (int); + + + + + unsigned char (* default_short_enums) (void); + + + + rtx (* builtin_setjmp_frame_value) (void); + + + + tree (* md_asm_clobbers) (tree, tree, tree); + + + + + + + int (* dwarf_calling_convention) (tree); +# 646 "../../GCC/gcc/target.h" + void (* dwarf_handle_frame_unspec) (const char *, rtx, int); + + + + + + unsigned char (* stdarg_optimize_hook) (struct stdarg_info *ai, tree lhs, tree rhs); + + + + + tree (* stack_protect_guard) (void); + + + + tree (* stack_protect_fail) (void); + + + + const char * (*invalid_within_doloop) (rtx); + + + + + unsigned char (* valid_dllimport_attribute_p) (tree decl); + + + struct calls { + unsigned char (*promote_function_args) (tree fntype); + unsigned char (*promote_function_return) (tree fntype); + unsigned char (*promote_prototypes) (tree fntype); + rtx (*struct_value_rtx) (tree fndecl, int incoming); + unsigned char (*return_in_memory) (tree type, tree fndecl); + unsigned char (*return_in_msb) (tree type); + + + + + unsigned char (*pass_by_reference) (CUMULATIVE_ARGS *ca, enum machine_mode mode, + tree type, unsigned char named_arg); + + rtx (*expand_builtin_saveregs) (void); + + void (*setup_incoming_varargs) (CUMULATIVE_ARGS *ca, enum machine_mode mode, + tree type, int *pretend_arg_size, + int second_time); + unsigned char (*strict_argument_naming) (CUMULATIVE_ARGS *ca); + + + + unsigned char (*pretend_outgoing_varargs_named) (CUMULATIVE_ARGS *ca); + + + + unsigned char (* split_complex_arg) (tree type); + + + + + + unsigned char (* must_pass_in_stack) (enum machine_mode mode, tree t); + + + + + unsigned char (* callee_copies) (CUMULATIVE_ARGS *ca, enum machine_mode mode, + tree type, unsigned char named); + + + + + int (* arg_partial_bytes) (CUMULATIVE_ARGS *ca, enum machine_mode mode, + tree type, unsigned char named); + + + + const char *(*invalid_arg_for_unprototyped_fn) (tree typelist, + tree funcdecl, tree val); + + + + rtx (*function_value) (tree ret_type, tree fn_decl_or_type, + unsigned char outgoing); + + + + rtx (*internal_arg_pointer) (void); + } calls; + + + + const char *(*invalid_conversion) (tree fromtype, tree totype); + + + + const char *(*invalid_unary_op) (int op, tree type); + + + + const char *(*invalid_binary_op) (int op, tree type1, tree type2); + + + enum reg_class (*secondary_reload) (unsigned char, rtx, enum reg_class, + enum machine_mode, + struct secondary_reload_info *); + + + struct cxx { + + tree (*guard_type) (void); + + unsigned char (*guard_mask_bit) (void); + + tree (*get_cookie_size) (tree); + + + unsigned char (*cookie_has_size) (void); + + + int (*import_export_class) (tree, int); + + unsigned char (*cdtor_returns_this) (void); + + + + + unsigned char (*key_method_may_be_inline) (void); + + + + + + + + void (*determine_class_data_visibility) (tree decl); + + + + + + unsigned char (*class_data_always_comdat) (void); + + + unsigned char (*use_aeabi_atexit) (void); + + + + + void (*adjust_class_at_definition) (tree type); + } cxx; + + + + + void (*live_on_entry) (bitmap); + + + unsigned char unwind_tables_default; + + + + + unsigned char have_named_sections; + + + + unsigned char have_switchable_bss_sections; + + + + unsigned char have_ctors_dtors; + + + unsigned char have_tls; + + + unsigned char have_srodata_section; + + + unsigned char terminate_dw2_eh_frame_info; + + + + unsigned char file_start_app_off; + + + + unsigned char file_start_file_directive; + + + unsigned char handle_pragma_redefine_extname; + + + unsigned char handle_pragma_extern_prefix; + + + + unsigned char relaxed_ordering; + + + + + unsigned char arm_eabi_unwinder; + + +}; + +extern struct gcc_target targetm; +# 58 "../../GCC/gcc/c-parser.c" 2 +# 1 "../../GCC/gcc/cgraph.h" 1 +# 24 "../../GCC/gcc/cgraph.h" +# 1 "../../GCC/gcc/basic-block.h" 1 +# 24 "../../GCC/gcc/basic-block.h" +# 1 "../../GCC/gcc/bitmap.h" 1 +# 27 "../../GCC/gcc/bitmap.h" +typedef unsigned long BITMAP_WORD; +# 43 "../../GCC/gcc/bitmap.h" +typedef struct bitmap_obstack +{ + struct bitmap_element_def *elements; + struct bitmap_head_def *heads; + struct obstack obstack; +} bitmap_obstack; +# 62 "../../GCC/gcc/bitmap.h" +typedef struct bitmap_element_def +{ + struct bitmap_element_def *next; + struct bitmap_element_def *prev; + unsigned int indx; + BITMAP_WORD bits[((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u))]; +} bitmap_element; + + +typedef struct bitmap_head_def { + bitmap_element *first; + bitmap_element *current; + unsigned int indx; + bitmap_obstack *obstack; + +} bitmap_head; + + + +extern bitmap_element bitmap_zero_bits; +extern bitmap_obstack bitmap_default_obstack; + + +extern void bitmap_clear (bitmap); + + +extern void bitmap_copy (bitmap, bitmap); + + +extern unsigned char bitmap_equal_p (bitmap, bitmap); + + +extern unsigned char bitmap_intersect_p (bitmap, bitmap); + + + +extern unsigned char bitmap_intersect_compl_p (bitmap, bitmap); + + + + + +extern unsigned long bitmap_count_bits (bitmap); + + + + + +extern void bitmap_and (bitmap, bitmap, bitmap); +extern void bitmap_and_into (bitmap, bitmap); +extern void bitmap_and_compl (bitmap, bitmap, bitmap); +extern unsigned char bitmap_and_compl_into (bitmap, bitmap); + +extern void bitmap_compl_and_into (bitmap, bitmap); +extern void bitmap_clear_range (bitmap, unsigned int, unsigned int); +extern unsigned char bitmap_ior (bitmap, bitmap, bitmap); +extern unsigned char bitmap_ior_into (bitmap, bitmap); +extern void bitmap_xor (bitmap, bitmap, bitmap); +extern void bitmap_xor_into (bitmap, bitmap); + + +extern unsigned char bitmap_ior_and_compl (bitmap DST, bitmap A, bitmap B, bitmap C); + +extern unsigned char bitmap_ior_and_compl_into (bitmap DST, bitmap B, bitmap C); + + +extern void bitmap_clear_bit (bitmap, int); + + +extern void bitmap_set_bit (bitmap, int); + + +extern int bitmap_bit_p (bitmap, int); + + +extern void debug_bitmap (bitmap); +extern void debug_bitmap_file (FILE *, bitmap); + + +extern void bitmap_print (FILE *, bitmap, const char *, const char *); + + +extern void bitmap_obstack_initialize (bitmap_obstack *); +extern void bitmap_obstack_release (bitmap_obstack *); + + + + +static __inline__ void +bitmap_initialize (bitmap head, bitmap_obstack *obstack) +{ + head->first = head->current = ((void *)0); + head->obstack = obstack; +} + + +extern bitmap bitmap_obstack_alloc (bitmap_obstack *obstack); +extern bitmap bitmap_gc_alloc (void); +extern void bitmap_obstack_free (bitmap); + + + + +extern unsigned bitmap_first_set_bit (bitmap); + + +extern hashval_t bitmap_hash(bitmap); +# 182 "../../GCC/gcc/bitmap.h" +typedef struct +{ + + bitmap_element *elt1; + + + bitmap_element *elt2; + + + unsigned word_no; + + + + + BITMAP_WORD bits; +} bitmap_iterator; + + + + +static __inline__ void +bmp_iter_set_init (bitmap_iterator *bi, bitmap map, + unsigned start_bit, unsigned *bit_no) +{ + bi->elt1 = map->first; + bi->elt2 = ((void *)0); + + + while (1) + { + if (!bi->elt1) + { + bi->elt1 = &bitmap_zero_bits; + break; + } + + if (bi->elt1->indx >= start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + break; + bi->elt1 = bi->elt1->next; + } + + + if (bi->elt1->indx != start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + start_bit = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + + + bi->word_no = start_bit / (8 * 4 * 1u) % ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)); + bi->bits = bi->elt1->bits[bi->word_no]; + bi->bits >>= start_bit % (8 * 4 * 1u); + + + + + + start_bit += !bi->bits; + + *bit_no = start_bit; +} + + + + +static __inline__ void +bmp_iter_and_init (bitmap_iterator *bi, bitmap map1, bitmap map2, + unsigned start_bit, unsigned *bit_no) +{ + bi->elt1 = map1->first; + bi->elt2 = map2->first; + + + + while (1) + { + if (!bi->elt1) + { + bi->elt2 = ((void *)0); + break; + } + + if (bi->elt1->indx >= start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + break; + bi->elt1 = bi->elt1->next; + } + + + while (1) + { + if (!bi->elt2) + { + bi->elt1 = bi->elt2 = &bitmap_zero_bits; + break; + } + + if (bi->elt2->indx >= bi->elt1->indx) + break; + bi->elt2 = bi->elt2->next; + } + + + if (bi->elt1->indx == bi->elt2->indx) + { + + + if (bi->elt1->indx != start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + start_bit = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + + bi->word_no = start_bit / (8 * 4 * 1u) % ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)); + bi->bits = bi->elt1->bits[bi->word_no] & bi->elt2->bits[bi->word_no]; + bi->bits >>= start_bit % (8 * 4 * 1u); + } + else + { + + + bi->word_no = ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) - 1; + bi->bits = 0; + } + + + + + + start_bit += !bi->bits; + + *bit_no = start_bit; +} + + + + +static __inline__ void +bmp_iter_and_compl_init (bitmap_iterator *bi, bitmap map1, bitmap map2, + unsigned start_bit, unsigned *bit_no) +{ + bi->elt1 = map1->first; + bi->elt2 = map2->first; + + + while (1) + { + if (!bi->elt1) + { + bi->elt1 = &bitmap_zero_bits; + break; + } + + if (bi->elt1->indx >= start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + break; + bi->elt1 = bi->elt1->next; + } + + + while (bi->elt2 && bi->elt2->indx < bi->elt1->indx) + bi->elt2 = bi->elt2->next; + + + + if (bi->elt1->indx != start_bit / (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u))) + start_bit = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + + bi->word_no = start_bit / (8 * 4 * 1u) % ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)); + bi->bits = bi->elt1->bits[bi->word_no]; + if (bi->elt2 && bi->elt1->indx == bi->elt2->indx) + bi->bits &= ~bi->elt2->bits[bi->word_no]; + bi->bits >>= start_bit % (8 * 4 * 1u); + + + + + + start_bit += !bi->bits; + + *bit_no = start_bit; +} + + + + +static __inline__ void +bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no) +{ + bi->bits >>= 1; + *bit_no += 1; +} + + + + + +static __inline__ unsigned char +bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no) +{ + + if (bi->bits) + { + next_bit: + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; + } + + + + + *bit_no = ((*bit_no + (8 * 4 * 1u) - 1) + / (8 * 4 * 1u) * (8 * 4 * 1u)); + bi->word_no++; + + while (1) + { + + while (bi->word_no != ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u))) + { + bi->bits = bi->elt1->bits[bi->word_no]; + if (bi->bits) + goto next_bit; + *bit_no += (8 * 4 * 1u); + bi->word_no++; + } + + + bi->elt1 = bi->elt1->next; + if (!bi->elt1) + return 0; + *bit_no = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + bi->word_no = 0; + } +} + + + + + +static __inline__ unsigned char +bmp_iter_and (bitmap_iterator *bi, unsigned *bit_no) +{ + + if (bi->bits) + { + next_bit: + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; + } + + + + + *bit_no = ((*bit_no + (8 * 4 * 1u) - 1) + / (8 * 4 * 1u) * (8 * 4 * 1u)); + bi->word_no++; + + while (1) + { + + while (bi->word_no != ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u))) + { + bi->bits = bi->elt1->bits[bi->word_no] & bi->elt2->bits[bi->word_no]; + if (bi->bits) + goto next_bit; + *bit_no += (8 * 4 * 1u); + bi->word_no++; + } + + + do + { + + + do + { + bi->elt1 = bi->elt1->next; + if (!bi->elt1) + return 0; + } + while (bi->elt1->indx < bi->elt2->indx); + + + + while (bi->elt2->indx < bi->elt1->indx) + { + bi->elt2 = bi->elt2->next; + if (!bi->elt2) + return 0; + } + } + while (bi->elt1->indx != bi->elt2->indx); + + *bit_no = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + bi->word_no = 0; + } +} + + + + + +static __inline__ unsigned char +bmp_iter_and_compl (bitmap_iterator *bi, unsigned *bit_no) +{ + + if (bi->bits) + { + next_bit: + while (!(bi->bits & 1)) + { + bi->bits >>= 1; + *bit_no += 1; + } + return 1; + } + + + + + *bit_no = ((*bit_no + (8 * 4 * 1u) - 1) + / (8 * 4 * 1u) * (8 * 4 * 1u)); + bi->word_no++; + + while (1) + { + + while (bi->word_no != ((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u))) + { + bi->bits = bi->elt1->bits[bi->word_no]; + if (bi->elt2 && bi->elt2->indx == bi->elt1->indx) + bi->bits &= ~bi->elt2->bits[bi->word_no]; + if (bi->bits) + goto next_bit; + *bit_no += (8 * 4 * 1u); + bi->word_no++; + } + + + bi->elt1 = bi->elt1->next; + if (!bi->elt1) + return 0; + + + while (bi->elt2 && bi->elt2->indx < bi->elt1->indx) + bi->elt2 = bi->elt2->next; + + *bit_no = bi->elt1->indx * (((128 + (8 * 4 * 1u) - 1) / (8 * 4 * 1u)) * (8 * 4 * 1u)); + bi->word_no = 0; + } +} +# 25 "../../GCC/gcc/basic-block.h" 2 +# 1 "../../GCC/gcc/sbitmap.h" 1 +# 31 "../../GCC/gcc/sbitmap.h" +typedef struct simple_bitmap_def +{ + unsigned int n_bits; + unsigned int size; + unsigned int bytes; + unsigned long elms[1]; +} *sbitmap; + +typedef unsigned long *sbitmap_ptr; +# 59 "../../GCC/gcc/sbitmap.h" +typedef struct { + + unsigned long *ptr; + + + unsigned int size; + + + unsigned int word_num; + + + unsigned int bit_num; + + + unsigned long word; +} sbitmap_iterator; + + + + +static __inline__ void +sbitmap_iter_init (sbitmap_iterator *i, sbitmap bmp, unsigned int min) +{ + i->word_num = min / (unsigned int) ((unsigned) (8 * 4)); + i->bit_num = min; + i->size = bmp->size; + i->ptr = bmp->elms; + + if (i->word_num >= i->size) + i->word = 0; + else + i->word = (i->ptr[i->word_num] + >> (i->bit_num % (unsigned int) ((unsigned) (8 * 4)))); +} + + + + + +static __inline__ unsigned char +sbitmap_iter_cond (sbitmap_iterator *i, unsigned int *n) +{ + + for (; i->word == 0; i->word = i->ptr[i->word_num]) + { + i->word_num++; + + + if (i->word_num >= i->size) + return 0; + + i->bit_num = i->word_num * ((unsigned) (8 * 4)); + } + + + for (; (i->word & 1) == 0; i->word >>= 1) + i->bit_num++; + + *n = i->bit_num; + + return 1; +} + + + +static __inline__ void +sbitmap_iter_next (sbitmap_iterator *i) +{ + i->word >>= 1; + i->bit_num++; +} +# 171 "../../GCC/gcc/sbitmap.h" +struct int_list; + +extern void dump_sbitmap (FILE *, sbitmap); +extern void dump_sbitmap_file (FILE *, sbitmap); +extern void dump_sbitmap_vector (FILE *, const char *, const char *, sbitmap *, + int); +extern sbitmap sbitmap_alloc (unsigned int); +extern sbitmap *sbitmap_vector_alloc (unsigned int, unsigned int); +extern sbitmap sbitmap_resize (sbitmap, unsigned int, int); +extern void sbitmap_copy (sbitmap, sbitmap); +extern int sbitmap_equal (sbitmap, sbitmap); +extern void sbitmap_zero (sbitmap); +extern void sbitmap_ones (sbitmap); +extern void sbitmap_vector_zero (sbitmap *, unsigned int); +extern void sbitmap_vector_ones (sbitmap *, unsigned int); + +extern void sbitmap_union_of_diff (sbitmap, sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_union_of_diff_cg (sbitmap, sbitmap, sbitmap, sbitmap); +extern void sbitmap_difference (sbitmap, sbitmap, sbitmap); +extern void sbitmap_not (sbitmap, sbitmap); +extern void sbitmap_a_or_b_and_c (sbitmap, sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_or_b_and_c_cg (sbitmap, sbitmap, sbitmap, sbitmap); +extern void sbitmap_a_and_b_or_c (sbitmap, sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_and_b_or_c_cg (sbitmap, sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_any_common_bits (sbitmap, sbitmap); +extern void sbitmap_a_and_b (sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_and_b_cg (sbitmap, sbitmap, sbitmap); +extern void sbitmap_a_or_b (sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_or_b_cg (sbitmap, sbitmap, sbitmap); +extern void sbitmap_a_xor_b (sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_xor_b_cg (sbitmap, sbitmap, sbitmap); +extern unsigned char sbitmap_a_subset_b_p (sbitmap, sbitmap); + +extern int sbitmap_first_set_bit (sbitmap); +extern int sbitmap_last_set_bit (sbitmap); + +extern void sbitmap_intersect_of_predsucc (sbitmap, sbitmap *, int, + struct int_list **); + + + +extern void sbitmap_union_of_predsucc (sbitmap, sbitmap *, int, + struct int_list **); + + + + + + +extern void sbitmap_intersection_of_succs (sbitmap, sbitmap *, int); +extern void sbitmap_intersection_of_preds (sbitmap, sbitmap *, int); +extern void sbitmap_union_of_succs (sbitmap, sbitmap *, int); +extern void sbitmap_union_of_preds (sbitmap, sbitmap *, int); + +extern void debug_sbitmap (sbitmap); +extern sbitmap sbitmap_realloc (sbitmap, unsigned int); +# 26 "../../GCC/gcc/basic-block.h" 2 +# 1 "../../GCC/gcc/varray.h" 1 +# 38 "../../GCC/gcc/varray.h" +enum varray_data_enum { + VARRAY_DATA_C, + VARRAY_DATA_UC, + VARRAY_DATA_S, + VARRAY_DATA_US, + VARRAY_DATA_I, + VARRAY_DATA_U, + VARRAY_DATA_L, + VARRAY_DATA_UL, + VARRAY_DATA_HINT, + VARRAY_DATA_UHINT, + VARRAY_DATA_GENERIC, + VARRAY_DATA_GENERIC_NOGC, + VARRAY_DATA_CPTR, + VARRAY_DATA_RTX, + VARRAY_DATA_RTVEC, + VARRAY_DATA_TREE, + VARRAY_DATA_BITMAP, + VARRAY_DATA_REG, + VARRAY_DATA_BB, + VARRAY_DATA_TE, + VARRAY_DATA_EDGE, + VARRAY_DATA_TREE_PTR, + NUM_VARRAY_DATA +}; + + +typedef union varray_data_tag { + char vdt_c[1]; + + unsigned char vdt_uc[1]; + + short vdt_s[1]; + + unsigned short vdt_us[1]; + + int vdt_i[1]; + + unsigned int vdt_u[1]; + + long vdt_l[1]; + + unsigned long vdt_ul[1]; + + long vdt_hint[1]; + + unsigned long vdt_uhint[1]; + + void * vdt_generic[1]; + + void * vdt_generic_nogc[1]; + + char * vdt_cptr[1]; + + rtx vdt_rtx[1]; + + rtvec vdt_rtvec[1]; + + tree vdt_tree[1]; + + struct bitmap_head_def * vdt_bitmap[1]; + + struct reg_info_def * vdt_reg[1]; + + struct basic_block_def * vdt_bb[1]; + + struct elt_list * vdt_te[1]; + + struct edge_def * vdt_e[1]; + + tree * vdt_tp[1]; + +} varray_data; + + +struct varray_head_tag { + size_t num_elements; + size_t elements_used; + + enum varray_data_enum type; + const char *name; + varray_data data; + +}; +typedef struct varray_head_tag *varray_type; + + + +extern varray_type varray_init (size_t, enum varray_data_enum, const char *); +# 200 "../../GCC/gcc/varray.h" +extern varray_type varray_grow (varray_type, size_t); +# 211 "../../GCC/gcc/varray.h" +extern void varray_clear (varray_type); +extern void dump_varray_statistics (void); +# 27 "../../GCC/gcc/basic-block.h" 2 +# 1 "../../GCC/gcc/../include/partition.h" 1 +# 46 "../../GCC/gcc/../include/partition.h" +struct partition_elem +{ + + + int class_element; + + + struct partition_elem* next; + + + unsigned class_count; +}; + +typedef struct partition_def +{ + + int num_elements; + + struct partition_elem elements[1]; +} *partition; + +extern partition partition_new (int); +extern void partition_delete (partition); +extern int partition_union (partition, int, int); +extern void partition_print (partition, FILE*); +# 28 "../../GCC/gcc/basic-block.h" 2 +# 1 "../../GCC/gcc/hard-reg-set.h" 1 +# 42 "../../GCC/gcc/hard-reg-set.h" +typedef unsigned long HARD_REG_ELT_TYPE; +# 53 "../../GCC/gcc/hard-reg-set.h" +typedef HARD_REG_ELT_TYPE HARD_REG_SET[((53 + (8 * 4) - 1) / (8 * 4))]; +# 396 "../../GCC/gcc/hard-reg-set.h" +extern char fixed_regs[53]; + + + +extern HARD_REG_SET fixed_reg_set; + + + + + + +extern char call_used_regs[53]; + + + + + + + +extern HARD_REG_SET call_used_reg_set; + + +extern HARD_REG_SET losing_caller_save_reg_set; + + + + + + + +extern char call_fixed_regs[53]; + + + +extern HARD_REG_SET call_fixed_reg_set; + + + + + + +extern char global_regs[53]; +# 446 "../../GCC/gcc/hard-reg-set.h" +extern HARD_REG_SET regs_invalidated_by_call; + + + + +extern int reg_alloc_order[53]; + + + +extern int inv_reg_alloc_order[53]; + + + + +extern HARD_REG_SET reg_class_contents[((int) LIM_REG_CLASSES)]; + + + +extern unsigned int reg_class_size[((int) LIM_REG_CLASSES)]; + + + + +extern enum reg_class reg_class_subunion[((int) LIM_REG_CLASSES)][((int) LIM_REG_CLASSES)]; + + + + +extern enum reg_class reg_class_superunion[((int) LIM_REG_CLASSES)][((int) LIM_REG_CLASSES)]; + + + +extern const char * reg_names[53]; + + + +extern const char * reg_class_names[]; +# 29 "../../GCC/gcc/basic-block.h" 2 +# 1 "../../GCC/gcc/predict.h" 1 +# 24 "../../GCC/gcc/predict.h" +enum br_predictor +{ +# 1 "../../GCC/gcc/predict.def" 1 +# 38 "../../GCC/gcc/predict.def" +PRED_COMBINED, + + +PRED_DS_THEORY, + + + +PRED_FIRST_MATCH, + + +PRED_NO_PREDICTION, + + +PRED_UNCONDITIONAL, + + + + + +PRED_LOOP_ITERATIONS, + + + +PRED_BUILTIN_EXPECT, + + + +PRED_CONTINUE, + + +PRED_NORETURN, + + + +PRED_LOOP_BRANCH, + + + +PRED_LOOP_EXIT, + + + + +PRED_LOOP_CONDITION, + + +PRED_LOOP_PRECONDITIONING, + + +PRED_LOOP_HEADER, + + +PRED_POINTER, +PRED_TREE_POINTER, + + +PRED_OPCODE_POSITIVE, +PRED_OPCODE_NONEQUAL, +PRED_FPOPCODE, +PRED_TREE_OPCODE_POSITIVE, +PRED_TREE_OPCODE_NONEQUAL, +PRED_TREE_FPOPCODE, + + +PRED_CALL, + + +PRED_EARLY_RETURN, +PRED_TREE_EARLY_RETURN, + + +PRED_GOTO, + + +PRED_CONST_RETURN, + + +PRED_NEGATIVE_RETURN, + + +PRED_NULL_RETURN, + + +PRED_MUDFLAP, +# 27 "../../GCC/gcc/predict.h" 2 + + + END_PREDICTORS +}; + +enum prediction +{ + NOT_TAKEN, + TAKEN +}; + +extern void predict_insn_def (rtx, enum br_predictor, enum prediction); +extern int counts_to_freqs (void); +# 30 "../../GCC/gcc/basic-block.h" 2 + +# 1 "../../GCC/gcc/function.h" 1 +# 27 "../../GCC/gcc/function.h" +struct var_refs_queue +{ + rtx modified; + enum machine_mode promoted_mode; + int unsignedp; + struct var_refs_queue *next; +}; + + + + + + +struct sequence_stack +{ + + rtx first; + rtx last; + struct sequence_stack *next; +}; + +extern struct sequence_stack *sequence_stack; + + + +struct simple_obstack_stack +{ + struct obstack *obstack; + struct simple_obstack_stack *next; +}; + +struct emit_status +{ + + + int x_reg_rtx_no; + + + int x_first_label_num; + + + + + + + rtx x_first_insn; + rtx x_last_insn; + + + + + + struct sequence_stack *sequence_stack; + + + + int x_cur_insn_uid; + + + + location_t x_last_location; + + + + + + int regno_pointer_align_length; + + + + + unsigned char * + regno_pointer_align; + + + + rtx * x_regno_reg_rtx; +}; +# 113 "../../GCC/gcc/function.h" +struct expr_status +{ + + + int x_pending_stack_adjust; +# 134 "../../GCC/gcc/function.h" + int x_inhibit_defer_pop; + + + + + + int x_stack_pointer_delta; + + + + + rtx x_saveregs_value; + + + rtx x_apply_args_value; + + + rtx x_forced_labels; +}; +# 161 "../../GCC/gcc/function.h" +struct temp_slot; +typedef struct temp_slot *temp_slot_p; + +static __inline__ void VEC_temp_slot_p_must_be_pointer_type (void) { (void)((temp_slot_p)1 == (void *)1); } typedef struct VEC_temp_slot_p_base { unsigned num; unsigned alloc; temp_slot_p vec[1]; } VEC_temp_slot_p_base; typedef struct VEC_temp_slot_p_none { VEC_temp_slot_p_base base; } VEC_temp_slot_p_none; static __inline__ unsigned VEC_temp_slot_p_base_length (const VEC_temp_slot_p_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ temp_slot_p VEC_temp_slot_p_base_last (const VEC_temp_slot_p_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ temp_slot_p VEC_temp_slot_p_base_index (const VEC_temp_slot_p_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_temp_slot_p_base_iterate (const VEC_temp_slot_p_base *vec_, unsigned ix_, temp_slot_p *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_temp_slot_p_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_temp_slot_p_base, vec) + alloc_ * sizeof(temp_slot_p); } static __inline__ void VEC_temp_slot_p_base_embedded_init (VEC_temp_slot_p_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_temp_slot_p_base_space (VEC_temp_slot_p_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ temp_slot_p *VEC_temp_slot_p_base_quick_push (VEC_temp_slot_p_base *vec_, temp_slot_p obj_ ) { temp_slot_p *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ temp_slot_p VEC_temp_slot_p_base_pop (VEC_temp_slot_p_base *vec_ ) { temp_slot_p obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_temp_slot_p_base_truncate (VEC_temp_slot_p_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ temp_slot_p VEC_temp_slot_p_base_replace (VEC_temp_slot_p_base *vec_, unsigned ix_, temp_slot_p obj_ ) { temp_slot_p old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ temp_slot_p *VEC_temp_slot_p_base_quick_insert (VEC_temp_slot_p_base *vec_, unsigned ix_, temp_slot_p obj_ ) { temp_slot_p *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (temp_slot_p)); *slot_ = obj_; return slot_; } static __inline__ temp_slot_p VEC_temp_slot_p_base_ordered_remove (VEC_temp_slot_p_base *vec_, unsigned ix_ ) { temp_slot_p *slot_; temp_slot_p obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (temp_slot_p)); return obj_; } static __inline__ temp_slot_p VEC_temp_slot_p_base_unordered_remove (VEC_temp_slot_p_base *vec_, unsigned ix_ ) { temp_slot_p *slot_; temp_slot_p obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_temp_slot_p_base_block_remove (VEC_temp_slot_p_base *vec_, unsigned ix_, unsigned len_ ) { temp_slot_p *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (temp_slot_p)); } static __inline__ temp_slot_p *VEC_temp_slot_p_base_address (VEC_temp_slot_p_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_temp_slot_p_base_lower_bound (VEC_temp_slot_p_base *vec_, const temp_slot_p obj_, unsigned char (*lessthan_)(const temp_slot_p, const temp_slot_p) ) { unsigned int len_ = VEC_temp_slot_p_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { temp_slot_p middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_temp_slot_p_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_temp_slot_p_gc { VEC_temp_slot_p_base base; } VEC_temp_slot_p_gc; static __inline__ VEC_temp_slot_p_gc *VEC_temp_slot_p_gc_alloc (int alloc_ ) { return (VEC_temp_slot_p_gc *) vec_gc_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_temp_slot_p_gc_free (VEC_temp_slot_p_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_temp_slot_p_gc *VEC_temp_slot_p_gc_copy (VEC_temp_slot_p_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_temp_slot_p_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_temp_slot_p_gc *)(vec_gc_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (temp_slot_p) * len_); } return new_vec_; } static __inline__ int VEC_temp_slot_p_gc_reserve (VEC_temp_slot_p_gc **vec_, int alloc_ ) { int extend = !VEC_temp_slot_p_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_temp_slot_p_gc *) vec_gc_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_temp_slot_p_gc_reserve_exact (VEC_temp_slot_p_gc **vec_, int alloc_ ) { int extend = !VEC_temp_slot_p_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_temp_slot_p_gc *) vec_gc_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_temp_slot_p_gc_safe_grow (VEC_temp_slot_p_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_temp_slot_p_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_temp_slot_p_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ temp_slot_p *VEC_temp_slot_p_gc_safe_push (VEC_temp_slot_p_gc **vec_, temp_slot_p obj_ ) { VEC_temp_slot_p_gc_reserve (vec_, 1 ); return VEC_temp_slot_p_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ temp_slot_p *VEC_temp_slot_p_gc_safe_insert (VEC_temp_slot_p_gc **vec_, unsigned ix_, temp_slot_p obj_ ) { VEC_temp_slot_p_gc_reserve (vec_, 1 ); return VEC_temp_slot_p_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; + +enum function_frequency { + + + FUNCTION_FREQUENCY_UNLIKELY_EXECUTED, + + FUNCTION_FREQUENCY_NORMAL, + + + FUNCTION_FREQUENCY_HOT +}; + + + + +struct function +{ + struct eh_status *eh; + struct expr_status *expr; + struct emit_status *emit; + struct varasm_status *varasm; + + + struct control_flow_graph *cfg; + + + + + tree decl; + + + struct function *outer; + + + + + int pops_args; + + + + + int args_size; + + + + + int pretend_args_size; + + + + int outgoing_args_size; + + + + rtx arg_offset_rtx; + + + + CUMULATIVE_ARGS args_info; + + + + + + rtx return_rtx; + + + rtx internal_arg_pointer; + + + + struct initial_value_struct *hard_reg_initial_vals; + + + + rtx x_nonlocal_goto_handler_labels; + + + + + rtx x_return_label; + + + + + rtx x_naked_return_label; + + + + rtx x_stack_slot_list; + + + rtx x_stack_check_probe_note; + + + + + + rtx x_arg_pointer_save_area; + + + + + long x_frame_offset; + + + + tree static_chain_decl; + + + + + tree nonlocal_goto_save_area; + + + rtx x_parm_birth_insn; + + + VEC_temp_slot_p_gc *x_used_temp_slots; + + + struct temp_slot *x_avail_temp_slots; + + + + struct var_refs_queue *fixup_var_refs_queue; + + + int x_temp_slot_level; + + + int inl_max_label_num; + + + int funcdef_no; + + + + + + + int max_loop_depth; + + + + + struct machine_function * machine; + + + unsigned int stack_alignment_needed; + + + unsigned int preferred_stack_boundary; + + + struct language_function * language; + + + htab_t used_types_hash; + + + + + + rtx epilogue_delay_list; + + + + int max_jumptable_ents; + + + int last_label_uid; + + + location_t function_end_locus; + + + VEC_tree_gc *ib_boundaries_block; + + + tree unexpanded_var_list; + + + + + + const char *hot_section_label; + const char *cold_section_label; + const char *hot_section_end_label; + const char *cold_section_end_label; + + + + + const char *unlikely_text_section_name; + + + + tree stack_protect_guard; + + + + + + unsigned int returns_struct : 1; + + + + unsigned int returns_pcc_struct : 1; + + + unsigned int returns_pointer : 1; + + + unsigned int calls_setjmp : 1; + + + + unsigned int calls_alloca : 1; + + + + unsigned int accesses_prior_frames : 1; + + + unsigned int calls_eh_return : 1; + + + + unsigned int has_nonlocal_label : 1; + + + + unsigned int has_nonlocal_goto : 1; + + + + + + unsigned int is_thunk : 1; + + + + + + + unsigned int all_throwers_are_sibcalls : 1; + + + unsigned int profile : 1; + + + + unsigned int limit_stack : 1; + + + unsigned int stdarg : 1; +# 431 "../../GCC/gcc/function.h" + unsigned int x_dont_save_pending_sizes_p : 1; + + + unsigned int uses_const_pool : 1; + + + unsigned int uses_pic_offset_table : 1; + + + unsigned int uses_eh_lsda : 1; + + + unsigned int arg_pointer_save_area_init : 1; + + unsigned int after_inlining : 1; + + + unsigned int recursive_call_emit : 1; + + + unsigned int tail_call_emit : 1; + + + + __extension__ enum function_frequency function_frequency : 2; + + + + + unsigned int va_list_gpr_size : 8; + + + + unsigned int va_list_fpr_size : 8; +}; + + + + + + + +extern struct function *cfun; + + +extern struct function *outer_function_chain; + + +extern int virtuals_instantiated; + + +extern int trampolines_created; +# 525 "../../GCC/gcc/function.h" +struct function *find_function_data (tree); + + + +extern void reorder_blocks (void); + + +extern void number_blocks (tree); + +extern void clear_block_marks (tree); +extern tree blocks_nreverse (tree); +extern void reset_block_changes (void); +extern void record_block_change (tree); +extern void finalize_block_changes (void); +extern void check_block_change (rtx, tree *); +extern void free_block_changes (void); + + + + +extern long get_frame_size (void); + + + + +extern unsigned char frame_offset_overflow (long, tree); + + + +extern struct machine_function * (*init_machine_status) (void); + + +extern void free_after_parsing (struct function *); +extern void free_after_compilation (struct function *); + +extern void init_varasm_status (struct function *); + + +extern void diddle_return_value (void (*)(rtx, void*), void*); +extern void clobber_return_register (void); + + +extern rtx get_arg_pointer_save_area (struct function *); + + +extern const char *current_function_name (void); + +extern void do_warn_unused_parameter (tree); + +extern unsigned char pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, + tree, unsigned char); +extern unsigned char reference_callee_copied (CUMULATIVE_ARGS *, enum machine_mode, + tree, unsigned char); + +extern void used_types_insert (tree); +# 32 "../../GCC/gcc/basic-block.h" 2 + + +typedef bitmap_head regset_head; + + +typedef bitmap regset; +# 83 "../../GCC/gcc/basic-block.h" +extern void reg_set_to_hard_reg_set (HARD_REG_SET *, bitmap); + + + + + + +typedef bitmap_iterator reg_set_iterator; +# 114 "../../GCC/gcc/basic-block.h" +typedef long long gcov_type; + + +struct edge_def +{ + + struct basic_block_def *src; + struct basic_block_def *dest; + + + union edge_def_insns { + rtx r; + tree t; + } insns; + + + void * aux; + + + source_locus goto_locus; + + int flags; + int probability; + gcov_type count; + + + + + unsigned int dest_idx; +}; + +typedef struct edge_def *edge; +static __inline__ void VEC_edge_must_be_pointer_type (void) { (void)((edge)1 == (void *)1); } typedef struct VEC_edge_base { unsigned num; unsigned alloc; edge vec[1]; } VEC_edge_base; typedef struct VEC_edge_none { VEC_edge_base base; } VEC_edge_none; static __inline__ unsigned VEC_edge_base_length (const VEC_edge_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ edge VEC_edge_base_last (const VEC_edge_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ edge VEC_edge_base_index (const VEC_edge_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_edge_base_iterate (const VEC_edge_base *vec_, unsigned ix_, edge *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_edge_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_edge_base, vec) + alloc_ * sizeof(edge); } static __inline__ void VEC_edge_base_embedded_init (VEC_edge_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_edge_base_space (VEC_edge_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ edge *VEC_edge_base_quick_push (VEC_edge_base *vec_, edge obj_ ) { edge *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ edge VEC_edge_base_pop (VEC_edge_base *vec_ ) { edge obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_edge_base_truncate (VEC_edge_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ edge VEC_edge_base_replace (VEC_edge_base *vec_, unsigned ix_, edge obj_ ) { edge old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ edge *VEC_edge_base_quick_insert (VEC_edge_base *vec_, unsigned ix_, edge obj_ ) { edge *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (edge)); *slot_ = obj_; return slot_; } static __inline__ edge VEC_edge_base_ordered_remove (VEC_edge_base *vec_, unsigned ix_ ) { edge *slot_; edge obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (edge)); return obj_; } static __inline__ edge VEC_edge_base_unordered_remove (VEC_edge_base *vec_, unsigned ix_ ) { edge *slot_; edge obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_edge_base_block_remove (VEC_edge_base *vec_, unsigned ix_, unsigned len_ ) { edge *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (edge)); } static __inline__ edge *VEC_edge_base_address (VEC_edge_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_edge_base_lower_bound (VEC_edge_base *vec_, const edge obj_, unsigned char (*lessthan_)(const edge, const edge) ) { unsigned int len_ = VEC_edge_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { edge middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_edge_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_edge_gc { VEC_edge_base base; } VEC_edge_gc; static __inline__ VEC_edge_gc *VEC_edge_gc_alloc (int alloc_ ) { return (VEC_edge_gc *) vec_gc_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_edge_gc_free (VEC_edge_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_edge_gc *VEC_edge_gc_copy (VEC_edge_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_edge_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_edge_gc *)(vec_gc_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (edge) * len_); } return new_vec_; } static __inline__ int VEC_edge_gc_reserve (VEC_edge_gc **vec_, int alloc_ ) { int extend = !VEC_edge_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_edge_gc *) vec_gc_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_edge_gc_reserve_exact (VEC_edge_gc **vec_, int alloc_ ) { int extend = !VEC_edge_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_edge_gc *) vec_gc_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_edge_gc_safe_grow (VEC_edge_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_edge_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_edge_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ edge *VEC_edge_gc_safe_push (VEC_edge_gc **vec_, edge obj_ ) { VEC_edge_gc_reserve (vec_, 1 ); return VEC_edge_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ edge *VEC_edge_gc_safe_insert (VEC_edge_gc **vec_, unsigned ix_, edge obj_ ) { VEC_edge_gc_reserve (vec_, 1 ); return VEC_edge_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; +# 177 "../../GCC/gcc/basic-block.h" +extern const struct gcov_ctr_summary *profile_info; + + +struct loop; +struct loops; + + +struct edge_prediction; +struct rtl_bb_info; +# 213 "../../GCC/gcc/basic-block.h" +struct basic_block_def +{ + + tree stmt_list; + + + VEC_edge_gc *preds; + VEC_edge_gc *succs; + + + void * aux; + + + struct loop * loop_father; + + + struct et_node * dom[2]; + + + struct basic_block_def *prev_bb; + struct basic_block_def *next_bb; + + union basic_block_il_dependent { + struct rtl_bb_info * rtl; + } il; + + + tree phi_nodes; + + + struct edge_prediction *predictions; + + + gcov_type count; + + + int index; + + + int loop_depth; + + + int frequency; + + + int flags; +}; + +struct rtl_bb_info +{ + + rtx head_; + rtx end_; + + + bitmap global_live_at_start; + + + bitmap global_live_at_end; + + + + rtx header; + rtx footer; + + + int visited; +}; + +typedef struct basic_block_def *basic_block; + +static __inline__ void VEC_basic_block_must_be_pointer_type (void) { (void)((basic_block)1 == (void *)1); } typedef struct VEC_basic_block_base { unsigned num; unsigned alloc; basic_block vec[1]; } VEC_basic_block_base; typedef struct VEC_basic_block_none { VEC_basic_block_base base; } VEC_basic_block_none; static __inline__ unsigned VEC_basic_block_base_length (const VEC_basic_block_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ basic_block VEC_basic_block_base_last (const VEC_basic_block_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ basic_block VEC_basic_block_base_index (const VEC_basic_block_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_basic_block_base_iterate (const VEC_basic_block_base *vec_, unsigned ix_, basic_block *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_basic_block_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_basic_block_base, vec) + alloc_ * sizeof(basic_block); } static __inline__ void VEC_basic_block_base_embedded_init (VEC_basic_block_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_basic_block_base_space (VEC_basic_block_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ basic_block *VEC_basic_block_base_quick_push (VEC_basic_block_base *vec_, basic_block obj_ ) { basic_block *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ basic_block VEC_basic_block_base_pop (VEC_basic_block_base *vec_ ) { basic_block obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_basic_block_base_truncate (VEC_basic_block_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ basic_block VEC_basic_block_base_replace (VEC_basic_block_base *vec_, unsigned ix_, basic_block obj_ ) { basic_block old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ basic_block *VEC_basic_block_base_quick_insert (VEC_basic_block_base *vec_, unsigned ix_, basic_block obj_ ) { basic_block *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (basic_block)); *slot_ = obj_; return slot_; } static __inline__ basic_block VEC_basic_block_base_ordered_remove (VEC_basic_block_base *vec_, unsigned ix_ ) { basic_block *slot_; basic_block obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (basic_block)); return obj_; } static __inline__ basic_block VEC_basic_block_base_unordered_remove (VEC_basic_block_base *vec_, unsigned ix_ ) { basic_block *slot_; basic_block obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_basic_block_base_block_remove (VEC_basic_block_base *vec_, unsigned ix_, unsigned len_ ) { basic_block *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (basic_block)); } static __inline__ basic_block *VEC_basic_block_base_address (VEC_basic_block_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_basic_block_base_lower_bound (VEC_basic_block_base *vec_, const basic_block obj_, unsigned char (*lessthan_)(const basic_block, const basic_block) ) { unsigned int len_ = VEC_basic_block_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { basic_block middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_basic_block_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_basic_block_gc { VEC_basic_block_base base; } VEC_basic_block_gc; static __inline__ VEC_basic_block_gc *VEC_basic_block_gc_alloc (int alloc_ ) { return (VEC_basic_block_gc *) vec_gc_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_basic_block_gc_free (VEC_basic_block_gc **vec_) { if (*vec_) ggc_free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_basic_block_gc *VEC_basic_block_gc_copy (VEC_basic_block_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_basic_block_gc *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_basic_block_gc *)(vec_gc_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (basic_block) * len_); } return new_vec_; } static __inline__ int VEC_basic_block_gc_reserve (VEC_basic_block_gc **vec_, int alloc_ ) { int extend = !VEC_basic_block_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_basic_block_gc *) vec_gc_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_basic_block_gc_reserve_exact (VEC_basic_block_gc **vec_, int alloc_ ) { int extend = !VEC_basic_block_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_basic_block_gc *) vec_gc_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_basic_block_gc_safe_grow (VEC_basic_block_gc **vec_, int size_ ) { (void)(size_ >= 0 && VEC_basic_block_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_basic_block_gc_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ basic_block *VEC_basic_block_gc_safe_push (VEC_basic_block_gc **vec_, basic_block obj_ ) { VEC_basic_block_gc_reserve (vec_, 1 ); return VEC_basic_block_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ basic_block *VEC_basic_block_gc_safe_insert (VEC_basic_block_gc **vec_, unsigned ix_, basic_block obj_ ) { VEC_basic_block_gc_reserve (vec_, 1 ); return VEC_basic_block_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; +typedef struct VEC_basic_block_heap { VEC_basic_block_base base; } VEC_basic_block_heap; static __inline__ VEC_basic_block_heap *VEC_basic_block_heap_alloc (int alloc_ ) { return (VEC_basic_block_heap *) vec_heap_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_basic_block_heap_free (VEC_basic_block_heap **vec_) { if (*vec_) free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_basic_block_heap *VEC_basic_block_heap_copy (VEC_basic_block_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_basic_block_heap *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_basic_block_heap *)(vec_heap_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (basic_block) * len_); } return new_vec_; } static __inline__ int VEC_basic_block_heap_reserve (VEC_basic_block_heap **vec_, int alloc_ ) { int extend = !VEC_basic_block_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_basic_block_heap *) vec_heap_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_basic_block_heap_reserve_exact (VEC_basic_block_heap **vec_, int alloc_ ) { int extend = !VEC_basic_block_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_basic_block_heap *) vec_heap_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_basic_block_heap_safe_grow (VEC_basic_block_heap **vec_, int size_ ) { (void)(size_ >= 0 && VEC_basic_block_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_basic_block_heap_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ basic_block *VEC_basic_block_heap_safe_push (VEC_basic_block_heap **vec_, basic_block obj_ ) { VEC_basic_block_heap_reserve (vec_, 1 ); return VEC_basic_block_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ basic_block *VEC_basic_block_heap_safe_insert (VEC_basic_block_heap **vec_, unsigned ix_, basic_block obj_ ) { VEC_basic_block_heap_reserve (vec_, 1 ); return VEC_basic_block_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; +# 298 "../../GCC/gcc/basic-block.h" +enum bb_flags +{ + + + BB_DIRTY = 1, + + + BB_NEW = 2, + + + + BB_REACHABLE = 4, + + + BB_IRREDUCIBLE_LOOP = 8, + + + BB_SUPERBLOCK = 16, + + + + BB_DISABLE_SCHEDULE = 32, + + + BB_HOT_PARTITION = 64, + + + BB_COLD_PARTITION = 128, + + + BB_DUPLICATED = 256, + + + BB_RTL = 1024, + + + + BB_FORWARDER_BLOCK = 2048, + + + + BB_NONTHREADABLE_BLOCK = 4096 +}; +# 361 "../../GCC/gcc/basic-block.h" +struct control_flow_graph +{ + + + basic_block x_entry_block_ptr; + basic_block x_exit_block_ptr; + + + VEC_basic_block_gc *x_basic_block_info; + + + int x_n_basic_blocks; + + + int x_n_edges; + + + int x_last_basic_block; + + + + VEC_basic_block_gc *x_label_to_block_map; + + enum profile_status { + PROFILE_ABSENT, + PROFILE_GUESSED, + PROFILE_READ + } x_profile_status; +}; +# 450 "../../GCC/gcc/basic-block.h" +extern bitmap_obstack reg_obstack; +# 481 "../../GCC/gcc/basic-block.h" +extern void compute_bb_for_insn (void); +extern unsigned int free_bb_for_insn (void); +extern void update_bb_for_insn (basic_block); + +extern void free_basic_block_vars (void); + +extern void insert_insn_on_edge (rtx, edge); + +extern void commit_edge_insertions (void); +extern void commit_edge_insertions_watch_calls (void); + +extern void remove_fake_edges (void); +extern void remove_fake_exit_edges (void); +extern void add_noreturn_fake_exit_edges (void); +extern void connect_infinite_loops_to_exit (void); +extern edge unchecked_make_edge (basic_block, basic_block, int); +extern edge cached_make_edge (sbitmap, basic_block, basic_block, int); +extern edge make_edge (basic_block, basic_block, int); +extern edge make_single_succ_edge (basic_block, basic_block, int); +extern void remove_edge (edge); +extern void redirect_edge_succ (edge, basic_block); +extern edge redirect_edge_succ_nodup (edge, basic_block); +extern void redirect_edge_pred (edge, basic_block); +extern basic_block create_basic_block_structure (rtx, rtx, rtx, basic_block); +extern void clear_bb_flags (void); +extern int post_order_compute (int *, unsigned char); +extern int pre_and_rev_post_order_compute (int *, int *, unsigned char); +extern int dfs_enumerate_from (basic_block, int, + unsigned char (*)(basic_block, void *), + basic_block *, int, void *); +extern void compute_dominance_frontiers (bitmap *); +extern void dump_bb_info (basic_block, unsigned char, unsigned char, int, const char *, FILE *); +extern void dump_edge_info (FILE *, edge, int); +extern void brief_dump_cfg (FILE *); +extern void clear_edges (void); +extern rtx first_insn_after_basic_block_note (basic_block); +extern void scale_bbs_frequencies_int (basic_block *, int, int, int); +extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type, + gcov_type); + + + + + + +typedef struct ce_if_block +{ + basic_block test_bb; + basic_block then_bb; + basic_block else_bb; + basic_block join_bb; + basic_block last_test_bb; + int num_multiple_test_blocks; + int num_and_and_blocks; + int num_or_or_blocks; + int num_multiple_test_insns; + int and_and_p; + int num_then_insns; + int num_else_insns; + int pass; + + + + + +} ce_if_block_t; + + +struct edge_list +{ + int num_blocks; + int num_edges; + edge *index_to_edge; +}; +# 602 "../../GCC/gcc/basic-block.h" +static __inline__ unsigned char +single_succ_p (basic_block bb) +{ + return (VEC_edge_base_length((((bb->succs)) ? &((bb->succs))->base : 0))) == 1; +} + + + +static __inline__ unsigned char +single_pred_p (basic_block bb) +{ + return (VEC_edge_base_length((((bb->preds)) ? &((bb->preds))->base : 0))) == 1; +} + + + + +static __inline__ edge +single_succ_edge (basic_block bb) +{ + ((void)(!(single_succ_p (bb)) ? fancy_abort ("../../GCC/gcc/basic-block.h", 622, __FUNCTION__), 0 : 0)); + return (VEC_edge_base_index((((bb)->succs) ? &((bb)->succs)->base : 0),(0) )); +} + + + + +static __inline__ edge +single_pred_edge (basic_block bb) +{ + ((void)(!(single_pred_p (bb)) ? fancy_abort ("../../GCC/gcc/basic-block.h", 632, __FUNCTION__), 0 : 0)); + return (VEC_edge_base_index((((bb)->preds) ? &((bb)->preds)->base : 0),(0) )); +} + + + + +static __inline__ basic_block +single_succ (basic_block bb) +{ + return single_succ_edge (bb)->dest; +} + + + + +static __inline__ basic_block +single_pred (basic_block bb) +{ + return single_pred_edge (bb)->src; +} + + + +typedef struct { + unsigned index; + VEC_edge_gc **container; +} edge_iterator; + +static __inline__ VEC_edge_gc * +ei_container (edge_iterator i) +{ + ((void)(!(i.container) ? fancy_abort ("../../GCC/gcc/basic-block.h", 664, __FUNCTION__), 0 : 0)); + return *i.container; +} + + + + + +static __inline__ edge_iterator +ei_start_1 (VEC_edge_gc **ev) +{ + edge_iterator i; + + i.index = 0; + i.container = ev; + + return i; +} + + + +static __inline__ edge_iterator +ei_last_1 (VEC_edge_gc **ev) +{ + edge_iterator i; + + i.index = (VEC_edge_base_length((((*ev)) ? &((*ev))->base : 0))) - 1; + i.container = ev; + + return i; +} + + +static __inline__ unsigned char +ei_end_p (edge_iterator i) +{ + return (i.index == (VEC_edge_base_length((((ei_container (i))) ? &((ei_container (i)))->base : 0)))); +} + + + +static __inline__ unsigned char +ei_one_before_end_p (edge_iterator i) +{ + return (i.index + 1 == (VEC_edge_base_length((((ei_container (i))) ? &((ei_container (i)))->base : 0)))); +} + + +static __inline__ void +ei_next (edge_iterator *i) +{ + ((void)(!(i->index < (VEC_edge_base_length((((ei_container (*i))) ? &((ei_container (*i)))->base : 0)))) ? fancy_abort ("../../GCC/gcc/basic-block.h", 715, __FUNCTION__), 0 : 0)); + i->index++; +} + + +static __inline__ void +ei_prev (edge_iterator *i) +{ + ((void)(!(i->index > 0) ? fancy_abort ("../../GCC/gcc/basic-block.h", 723, __FUNCTION__), 0 : 0)); + i->index--; +} + + +static __inline__ edge +ei_edge (edge_iterator i) +{ + return (VEC_edge_base_index((((ei_container (i))) ? &((ei_container (i)))->base : 0),(i.index) )); +} + + + + +static __inline__ edge +ei_safe_edge (edge_iterator i) +{ + return !ei_end_p (i) ? ei_edge (i) : ((void *)0); +} + + + + + +static __inline__ unsigned char +ei_cond (edge_iterator ei, edge *p) +{ + if (!ei_end_p (ei)) + { + *p = ei_edge (ei); + return 1; + } + else + { + *p = ((void *)0); + return 0; + } +} +# 782 "../../GCC/gcc/basic-block.h" +struct edge_list * create_edge_list (void); +void free_edge_list (struct edge_list *); +void print_edge_list (FILE *, struct edge_list *); +void verify_edge_list (FILE *, struct edge_list *); +int find_edge_index (struct edge_list *, basic_block, basic_block); +edge find_edge (basic_block, basic_block); + + +enum update_life_extent +{ + UPDATE_LIFE_LOCAL = 0, + UPDATE_LIFE_GLOBAL = 1, + UPDATE_LIFE_GLOBAL_RM_NOTES = 2 +}; +# 848 "../../GCC/gcc/basic-block.h" +extern void life_analysis (int); +extern int update_life_info (sbitmap, enum update_life_extent, int); +extern int update_life_info_in_dirty_blocks (enum update_life_extent, int); +extern int count_or_remove_death_notes (sbitmap, int); +extern int propagate_block (basic_block, regset, regset, regset, int); + +struct propagate_block_info; +extern rtx propagate_one_insn (struct propagate_block_info *, rtx); +extern struct propagate_block_info *init_propagate_block_info + (basic_block, regset, regset, regset, int); +extern void free_propagate_block_info (struct propagate_block_info *); + + +extern struct edge_list *pre_edge_lcm (int, sbitmap *, sbitmap *, + sbitmap *, sbitmap *, sbitmap **, + sbitmap **); +extern struct edge_list *pre_edge_rev_lcm (int, sbitmap *, + sbitmap *, sbitmap *, + sbitmap *, sbitmap **, + sbitmap **); +extern void compute_available (sbitmap *, sbitmap *, sbitmap *, sbitmap *); + + +extern void expected_value_to_br_prob (void); +extern unsigned char maybe_hot_bb_p (basic_block); +extern unsigned char probably_cold_bb_p (basic_block); +extern unsigned char probably_never_executed_bb_p (basic_block); +extern unsigned char tree_predicted_by_p (basic_block, enum br_predictor); +extern unsigned char rtl_predicted_by_p (basic_block, enum br_predictor); +extern void tree_predict_edge (edge, enum br_predictor, int); +extern void rtl_predict_edge (edge, enum br_predictor, int); +extern void predict_edge_def (edge, enum br_predictor, enum prediction); +extern void guess_outgoing_edge_probabilities (basic_block); +extern void remove_predictions_associated_with_edge (edge); +extern unsigned char edge_probability_reliable_p (edge); +extern unsigned char br_prob_note_reliable_p (rtx); + + +extern void init_flow (void); +extern void debug_bb (basic_block); +extern basic_block debug_bb_n (int); +extern void dump_regset (regset, FILE *); +extern void debug_regset (regset); +extern void allocate_reg_life_data (void); +extern void expunge_block (basic_block); +extern void link_block (basic_block, basic_block); +extern void unlink_block (basic_block); +extern void compact_blocks (void); +extern basic_block alloc_block (void); +extern void find_unreachable_blocks (void); +extern int delete_noop_moves (void); +extern basic_block force_nonfallthru (edge); +extern rtx block_label (basic_block); +extern unsigned char forwarder_block_p (basic_block); +extern unsigned char purge_all_dead_edges (void); +extern unsigned char purge_dead_edges (basic_block); +extern void find_many_sub_basic_blocks (sbitmap); +extern void rtl_make_eh_edge (sbitmap, basic_block, rtx); +extern unsigned char can_fallthru (basic_block, basic_block); +extern unsigned char could_fall_through (basic_block, basic_block); +extern void flow_nodes_print (const char *, const sbitmap, FILE *); +extern void flow_edge_list_print (const char *, const edge *, int, FILE *); +extern void alloc_aux_for_block (basic_block, int); +extern void alloc_aux_for_blocks (int); +extern void clear_aux_for_blocks (void); +extern void free_aux_for_blocks (void); +extern void alloc_aux_for_edge (edge, int); +extern void alloc_aux_for_edges (int); +extern void clear_aux_for_edges (void); +extern void free_aux_for_edges (void); +extern void find_basic_blocks (rtx); +extern unsigned char cleanup_cfg (int); +extern unsigned char delete_unreachable_blocks (void); +extern unsigned char merge_seq_blocks (void); + +typedef struct conflict_graph_def *conflict_graph; + + + + +typedef int (*conflict_graph_enum_fn) (int, int, void *); + + + + +extern conflict_graph conflict_graph_new + (int); +extern void conflict_graph_delete (conflict_graph); +extern int conflict_graph_add (conflict_graph, int, int); +extern int conflict_graph_conflict_p (conflict_graph, int, int); +extern void conflict_graph_enum (conflict_graph, int, conflict_graph_enum_fn, + void *); +extern void conflict_graph_merge_regs (conflict_graph, int, int); +extern void conflict_graph_print (conflict_graph, FILE*); +extern unsigned char mark_dfs_back_edges (void); +extern void set_edge_can_fallthru_flag (void); +extern void update_br_prob_note (basic_block); +extern void fixup_abnormal_edges (void); +extern unsigned char inside_basic_block_p (rtx); +extern unsigned char control_flow_insn_p (rtx); +extern rtx get_last_bb_insn (basic_block); + + +extern void reorder_basic_blocks (unsigned int); + + + +enum cdi_direction +{ + CDI_DOMINATORS, + CDI_POST_DOMINATORS +}; + +enum dom_state +{ + DOM_NONE, + DOM_NO_FAST_QUERY, + DOM_OK +}; + +extern enum dom_state dom_computed[2]; + +extern unsigned char dom_info_available_p (enum cdi_direction); +extern void calculate_dominance_info (enum cdi_direction); +extern void free_dominance_info (enum cdi_direction); +extern basic_block nearest_common_dominator (enum cdi_direction, + basic_block, basic_block); +extern basic_block nearest_common_dominator_for_set (enum cdi_direction, + bitmap); +extern void set_immediate_dominator (enum cdi_direction, basic_block, + basic_block); +extern basic_block get_immediate_dominator (enum cdi_direction, basic_block); +extern unsigned char dominated_by_p (enum cdi_direction, basic_block, basic_block); +extern int get_dominated_by (enum cdi_direction, basic_block, basic_block **); +extern unsigned get_dominated_by_region (enum cdi_direction, basic_block *, + unsigned, basic_block *); +extern void add_to_dominance_info (enum cdi_direction, basic_block); +extern void delete_from_dominance_info (enum cdi_direction, basic_block); +basic_block recount_dominator (enum cdi_direction, basic_block); +extern void redirect_immediate_dominators (enum cdi_direction, basic_block, + basic_block); +extern void iterate_fix_dominators (enum cdi_direction, basic_block *, int); +extern void verify_dominators (enum cdi_direction); +extern basic_block first_dom_son (enum cdi_direction, basic_block); +extern basic_block next_dom_son (enum cdi_direction, basic_block); +unsigned bb_dom_dfs_in (enum cdi_direction, basic_block); +unsigned bb_dom_dfs_out (enum cdi_direction, basic_block); + +extern edge try_redirect_by_replacing_jump (edge, basic_block, unsigned char); +extern void break_superblocks (void); +extern void check_bb_profile (basic_block, FILE *); +extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge); +extern void init_rtl_bb_info (basic_block); + +extern void initialize_original_copy_tables (void); +extern void free_original_copy_tables (void); +extern void set_bb_original (basic_block, basic_block); +extern basic_block get_bb_original (basic_block); +extern void set_bb_copy (basic_block, basic_block); +extern basic_block get_bb_copy (basic_block); + +extern rtx insert_insn_end_bb_new (rtx, basic_block); + +# 1 "../../GCC/gcc/cfghooks.h" 1 +# 24 "../../GCC/gcc/cfghooks.h" +struct cfg_hooks +{ + + const char *name; + + + int (*verify_flow_info) (void); + void (*dump_bb) (basic_block, FILE *, int); + + + + + basic_block (*create_basic_block) (void *head, void *end, basic_block after); + + + + + + edge (*redirect_edge_and_branch) (edge e, basic_block b); + + + + + basic_block (*redirect_edge_and_branch_force) (edge, basic_block); + + + void (*delete_basic_block) (basic_block); + + + + basic_block (*split_block) (basic_block b, void * i); + + + unsigned char (*move_block_after) (basic_block b, basic_block a); + + + unsigned char (*can_merge_blocks_p) (basic_block a, basic_block b); + + + void (*merge_blocks) (basic_block a, basic_block b); + + + void (*predict_edge) (edge e, enum br_predictor predictor, int probability); + + + + unsigned char (*predicted_by_p) (basic_block bb, enum br_predictor predictor); + + + unsigned char (*can_duplicate_block_p) (basic_block a); + + + basic_block (*duplicate_block) (basic_block a); + + + + basic_block (*split_edge) (edge); + void (*make_forwarder_block) (edge); + + + void (*tidy_fallthru_edge) (edge); + + + + unsigned char (*block_ends_with_call_p) (basic_block); + + + + unsigned char (*block_ends_with_condjump_p) (basic_block); +# 101 "../../GCC/gcc/cfghooks.h" + int (*flow_call_edges_add) (sbitmap); + + + + void (*execute_on_growing_pred) (edge); + + + + void (*execute_on_shrinking_pred) (edge); + + + + unsigned char (*cfg_hook_duplicate_loop_to_header_edge) (struct loop *loop, edge e, + struct loops *loops, + unsigned int ndupl, + sbitmap wont_exit, + edge orig, edge *to_remove, + unsigned int *n_to_remove, + int flags); + + + + void (*lv_add_condition_to_bb) (basic_block, basic_block, basic_block, + void *); + + void (*lv_adjust_loop_header_phi) (basic_block, basic_block, + basic_block, edge); + + + + void (*extract_cond_bb_edges) (basic_block, edge *, edge *); + + + + + void (*flush_pending_stmts) (edge); +}; + +extern void verify_flow_info (void); +extern void dump_bb (basic_block, FILE *, int); +extern edge redirect_edge_and_branch (edge, basic_block); +extern basic_block redirect_edge_and_branch_force (edge, basic_block); +extern edge split_block (basic_block, void *); +extern edge split_block_after_labels (basic_block); +extern unsigned char move_block_after (basic_block, basic_block); +extern void delete_basic_block (basic_block); +extern basic_block split_edge (edge); +extern basic_block create_basic_block (void *, void *, basic_block); +extern basic_block create_empty_bb (basic_block); +extern unsigned char can_merge_blocks_p (basic_block, basic_block); +extern void merge_blocks (basic_block, basic_block); +extern edge make_forwarder_block (basic_block, unsigned char (*)(edge), + void (*) (basic_block)); +extern void tidy_fallthru_edge (edge); +extern void tidy_fallthru_edges (void); +extern void predict_edge (edge e, enum br_predictor predictor, int probability); +extern unsigned char predicted_by_p (basic_block bb, enum br_predictor predictor); +extern unsigned char can_duplicate_block_p (basic_block); +extern basic_block duplicate_block (basic_block, edge, basic_block); +extern unsigned char block_ends_with_call_p (basic_block bb); +extern unsigned char block_ends_with_condjump_p (basic_block bb); +extern int flow_call_edges_add (sbitmap); +extern void execute_on_growing_pred (edge); +extern void execute_on_shrinking_pred (edge); +extern unsigned char cfg_hook_duplicate_loop_to_header_edge (struct loop *loop, edge, + struct loops *loops, + unsigned int ndupl, + sbitmap wont_exit, + edge orig, edge *to_remove, + unsigned int *n_to_remove, + int flags); + +extern void lv_flush_pending_stmts (edge); +extern void extract_cond_bb_edges (basic_block, edge *, edge*); +extern void lv_adjust_loop_header_phi (basic_block, basic_block, basic_block, + edge); +extern void lv_add_condition_to_bb (basic_block, basic_block, basic_block, + void *); + + +extern struct cfg_hooks tree_cfg_hooks; +extern struct cfg_hooks rtl_cfg_hooks; +extern struct cfg_hooks cfg_layout_rtl_cfg_hooks; + + +extern int ir_type (void); +extern void rtl_register_cfg_hooks (void); +extern void cfg_layout_rtl_register_cfg_hooks (void); +extern void tree_register_cfg_hooks (void); +# 1012 "../../GCC/gcc/basic-block.h" 2 +# 1031 "../../GCC/gcc/basic-block.h" +struct struct_equiv_checkpoint +{ + int ninsns; + int local_count; + int input_count; + + + + + + + + rtx x_start, y_start; + + + + + unsigned char input_valid; +# 1057 "../../GCC/gcc/basic-block.h" + int version; +}; + + + + + +struct equiv_info +{ + + + basic_block x_block, y_block; + + + + + int mode; + + + + + + int input_cost; +# 1090 "../../GCC/gcc/basic-block.h" + rtx x_input, y_input; + + + + rtx input_reg; + + + + + + regset common_live; + + + + regset x_local_live, y_local_live; + + + + + + + bitmap equiv_used; + + + struct struct_equiv_checkpoint cur; + + + + struct struct_equiv_checkpoint best_match; + + + + + + unsigned char need_rerun; + + + + + + unsigned char check_input_conflict; + + + + unsigned char had_input_conflict; + + + + + + + unsigned char live_update; + + + + + rtx x_local[16], y_local[16]; + + + + + + unsigned char local_rvalue[16]; + + + + + + + int dying_inputs; + + + rtx x_end, y_end; + + + + rtx x_label, y_label; + +}; + +extern unsigned char insns_match_p (rtx, rtx, struct equiv_info *); +extern int struct_equiv_block_eq (int, struct equiv_info *); +extern unsigned char struct_equiv_init (int, struct equiv_info *); +extern unsigned char rtx_equiv_p (rtx *, rtx, int, struct equiv_info *); + + +extern unsigned char condjump_equiv_p (struct equiv_info *, unsigned char); + + +static __inline__ unsigned char bb_has_eh_pred (basic_block bb) +{ + edge e; + edge_iterator ei; + + for ((ei) = ei_start_1 (&((bb->preds))); ei_cond ((ei), &(e)); ei_next (&(ei))) + { + if (e->flags & 8) + return 1; + } + return 0; +} +# 25 "../../GCC/gcc/cgraph.h" 2 + +enum availability +{ + + AVAIL_UNSET, + + AVAIL_NOT_AVAILABLE, + + + + + + AVAIL_OVERWRITABLE, + + + AVAIL_AVAILABLE, + + + + + AVAIL_LOCAL +}; + + + + +struct cgraph_local_info +{ + + int self_insns; + + + + unsigned local : 1; + + + unsigned externally_visible : 1; + + + unsigned finalized : 1; + + + unsigned inlinable : 1; + + + unsigned disregard_inline_limits : 1; + + + + unsigned redefined_extern_inline : 1; + + + + unsigned for_functions_valid : 1; + + + + unsigned vtable_method : 1; +}; + + + + +struct cgraph_global_info +{ + + struct cgraph_node *inlined_to; + + + int insns; + + + int estimated_growth; + + + unsigned char inlined; +}; + + + + +struct cgraph_rtl_info +{ + int preferred_incoming_stack_boundary; +}; + + + + +struct cgraph_node +{ + tree decl; + struct cgraph_edge *callees; + struct cgraph_edge *callers; + struct cgraph_node *next; + struct cgraph_node *previous; + + struct cgraph_node *origin; + + struct cgraph_node *nested; + + struct cgraph_node *next_nested; + + struct cgraph_node *next_needed; + + struct cgraph_node *next_clone; + struct cgraph_node *prev_clone; + + + struct cgraph_node *master_clone; + + + htab_t call_site_hash; + + void * aux; + + struct cgraph_local_info local; + struct cgraph_global_info global; + struct cgraph_rtl_info rtl; + + + gcov_type count; + + int uid; + + int order; + + + + unsigned needed : 1; + + + unsigned reachable : 1; + + unsigned lowered : 1; + + + unsigned analyzed : 1; + + unsigned output : 1; + + unsigned alias : 1; + + + + + tree inline_decl; +}; + +struct cgraph_edge +{ + struct cgraph_node *caller; + struct cgraph_node *callee; + struct cgraph_edge *prev_caller; + struct cgraph_edge *next_caller; + struct cgraph_edge *prev_callee; + struct cgraph_edge *next_callee; + tree call_stmt; + void * aux; + + + const char *inline_failed; + + gcov_type count; + + int loop_nest; +}; + +typedef struct cgraph_edge *cgraph_edge_p; + +static __inline__ void VEC_cgraph_edge_p_must_be_pointer_type (void) { (void)((cgraph_edge_p)1 == (void *)1); } typedef struct VEC_cgraph_edge_p_base { unsigned num; unsigned alloc; cgraph_edge_p vec[1]; } VEC_cgraph_edge_p_base; typedef struct VEC_cgraph_edge_p_none { VEC_cgraph_edge_p_base base; } VEC_cgraph_edge_p_none; static __inline__ unsigned VEC_cgraph_edge_p_base_length (const VEC_cgraph_edge_p_base *vec_) { return vec_ ? vec_->num : 0; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_last (const VEC_cgraph_edge_p_base *vec_ ) { (void)(vec_ && vec_->num); return vec_->vec[vec_->num - 1]; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_index (const VEC_cgraph_edge_p_base *vec_, unsigned ix_ ) { (void)(vec_ && ix_ < vec_->num); return vec_->vec[ix_]; } static __inline__ int VEC_cgraph_edge_p_base_iterate (const VEC_cgraph_edge_p_base *vec_, unsigned ix_, cgraph_edge_p *ptr) { if (vec_ && ix_ < vec_->num) { *ptr = vec_->vec[ix_]; return 1; } else { *ptr = 0; return 0; } } static __inline__ size_t VEC_cgraph_edge_p_base_embedded_size (int alloc_) { return __builtin_offsetof (VEC_cgraph_edge_p_base, vec) + alloc_ * sizeof(cgraph_edge_p); } static __inline__ void VEC_cgraph_edge_p_base_embedded_init (VEC_cgraph_edge_p_base *vec_, int alloc_) { vec_->num = 0; vec_->alloc = alloc_; } static __inline__ int VEC_cgraph_edge_p_base_space (VEC_cgraph_edge_p_base *vec_, int alloc_ ) { (void)(alloc_ >= 0); return vec_ ? vec_->alloc - vec_->num >= (unsigned)alloc_ : !alloc_; } static __inline__ cgraph_edge_p *VEC_cgraph_edge_p_base_quick_push (VEC_cgraph_edge_p_base *vec_, cgraph_edge_p obj_ ) { cgraph_edge_p *slot_; (void)(vec_->num < vec_->alloc); slot_ = &vec_->vec[vec_->num++]; *slot_ = obj_; return slot_; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_pop (VEC_cgraph_edge_p_base *vec_ ) { cgraph_edge_p obj_; (void)(vec_->num); obj_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_cgraph_edge_p_base_truncate (VEC_cgraph_edge_p_base *vec_, unsigned size_ ) { (void)(vec_ ? vec_->num >= size_ : !size_); if (vec_) vec_->num = size_; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_replace (VEC_cgraph_edge_p_base *vec_, unsigned ix_, cgraph_edge_p obj_ ) { cgraph_edge_p old_obj_; (void)(ix_ < vec_->num); old_obj_ = vec_->vec[ix_]; vec_->vec[ix_] = obj_; return old_obj_; } static __inline__ cgraph_edge_p *VEC_cgraph_edge_p_base_quick_insert (VEC_cgraph_edge_p_base *vec_, unsigned ix_, cgraph_edge_p obj_ ) { cgraph_edge_p *slot_; (void)(vec_->num < vec_->alloc); (void)(ix_ <= vec_->num); slot_ = &vec_->vec[ix_]; memmove (slot_ + 1, slot_, (vec_->num++ - ix_) * sizeof (cgraph_edge_p)); *slot_ = obj_; return slot_; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_ordered_remove (VEC_cgraph_edge_p_base *vec_, unsigned ix_ ) { cgraph_edge_p *slot_; cgraph_edge_p obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; memmove (slot_, slot_ + 1, (--vec_->num - ix_) * sizeof (cgraph_edge_p)); return obj_; } static __inline__ cgraph_edge_p VEC_cgraph_edge_p_base_unordered_remove (VEC_cgraph_edge_p_base *vec_, unsigned ix_ ) { cgraph_edge_p *slot_; cgraph_edge_p obj_; (void)(ix_ < vec_->num); slot_ = &vec_->vec[ix_]; obj_ = *slot_; *slot_ = vec_->vec[--vec_->num]; return obj_; } static __inline__ void VEC_cgraph_edge_p_base_block_remove (VEC_cgraph_edge_p_base *vec_, unsigned ix_, unsigned len_ ) { cgraph_edge_p *slot_; (void)(ix_ + len_ <= vec_->num); slot_ = &vec_->vec[ix_]; vec_->num -= len_; memmove (slot_, slot_ + len_, (vec_->num - ix_) * sizeof (cgraph_edge_p)); } static __inline__ cgraph_edge_p *VEC_cgraph_edge_p_base_address (VEC_cgraph_edge_p_base *vec_) { return vec_ ? vec_->vec : 0; } static __inline__ unsigned VEC_cgraph_edge_p_base_lower_bound (VEC_cgraph_edge_p_base *vec_, const cgraph_edge_p obj_, unsigned char (*lessthan_)(const cgraph_edge_p, const cgraph_edge_p) ) { unsigned int len_ = VEC_cgraph_edge_p_base_length (vec_); unsigned int half_, middle_; unsigned int first_ = 0; while (len_ > 0) { cgraph_edge_p middle_elem_; half_ = len_ >> 1; middle_ = first_; middle_ += half_; middle_elem_ = VEC_cgraph_edge_p_base_index (vec_, middle_ ); if (lessthan_ (middle_elem_, obj_)) { first_ = middle_; ++first_; len_ = len_ - half_ - 1; } else len_ = half_; } return first_; } struct vec_swallow_trailing_semi; +typedef struct VEC_cgraph_edge_p_heap { VEC_cgraph_edge_p_base base; } VEC_cgraph_edge_p_heap; static __inline__ VEC_cgraph_edge_p_heap *VEC_cgraph_edge_p_heap_alloc (int alloc_ ) { return (VEC_cgraph_edge_p_heap *) vec_heap_p_reserve_exact (((void *)0), alloc_ ); } static __inline__ void VEC_cgraph_edge_p_heap_free (VEC_cgraph_edge_p_heap **vec_) { if (*vec_) free (*vec_); *vec_ = ((void *)0); } static __inline__ VEC_cgraph_edge_p_heap *VEC_cgraph_edge_p_heap_copy (VEC_cgraph_edge_p_base *vec_ ) { size_t len_ = vec_ ? vec_->num : 0; VEC_cgraph_edge_p_heap *new_vec_ = ((void *)0); if (len_) { new_vec_ = (VEC_cgraph_edge_p_heap *)(vec_heap_p_reserve_exact (((void *)0), len_ )); new_vec_->base.num = len_; memcpy (new_vec_->base.vec, vec_->vec, sizeof (cgraph_edge_p) * len_); } return new_vec_; } static __inline__ int VEC_cgraph_edge_p_heap_reserve (VEC_cgraph_edge_p_heap **vec_, int alloc_ ) { int extend = !VEC_cgraph_edge_p_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_cgraph_edge_p_heap *) vec_heap_p_reserve (*vec_, alloc_ ); return extend; } static __inline__ int VEC_cgraph_edge_p_heap_reserve_exact (VEC_cgraph_edge_p_heap **vec_, int alloc_ ) { int extend = !VEC_cgraph_edge_p_base_space (((*vec_) ? &(*vec_)->base : 0), alloc_ ); if (extend) *vec_ = (VEC_cgraph_edge_p_heap *) vec_heap_p_reserve_exact (*vec_, alloc_ ); return extend; } static __inline__ void VEC_cgraph_edge_p_heap_safe_grow (VEC_cgraph_edge_p_heap **vec_, int size_ ) { (void)(size_ >= 0 && VEC_cgraph_edge_p_base_length ((*vec_) ? &(*vec_)->base : 0) <= (unsigned)size_); VEC_cgraph_edge_p_heap_reserve_exact (vec_, size_ - (int)(*vec_ ? ((*vec_) ? &(*vec_)->base : 0)->num : 0) ); ((*vec_) ? &(*vec_)->base : 0)->num = size_; } static __inline__ cgraph_edge_p *VEC_cgraph_edge_p_heap_safe_push (VEC_cgraph_edge_p_heap **vec_, cgraph_edge_p obj_ ) { VEC_cgraph_edge_p_heap_reserve (vec_, 1 ); return VEC_cgraph_edge_p_base_quick_push (((*vec_) ? &(*vec_)->base : 0), obj_ ); } static __inline__ cgraph_edge_p *VEC_cgraph_edge_p_heap_safe_insert (VEC_cgraph_edge_p_heap **vec_, unsigned ix_, cgraph_edge_p obj_ ) { VEC_cgraph_edge_p_heap_reserve (vec_, 1 ); return VEC_cgraph_edge_p_base_quick_insert (((*vec_) ? &(*vec_)->base : 0), ix_, obj_ ); } struct vec_swallow_trailing_semi; + + + + +struct cgraph_varpool_node +{ + tree decl; + + struct cgraph_varpool_node *next; + + struct cgraph_varpool_node *next_needed; + + int order; + + + + unsigned needed : 1; + + + unsigned force_output : 1; + + + unsigned analyzed : 1; + + unsigned finalized : 1; + + unsigned output : 1; + + unsigned externally_visible : 1; + + unsigned alias : 1; +}; + + + +struct cgraph_asm_node +{ + + struct cgraph_asm_node *next; + + tree asm_str; + + int order; +}; + +extern struct cgraph_node *cgraph_nodes; +extern int cgraph_n_nodes; +extern int cgraph_max_uid; +extern unsigned char cgraph_global_info_ready; +extern unsigned char cgraph_function_flags_ready; +extern struct cgraph_node *cgraph_nodes_queue; +extern struct cgraph_node *cgraph_expand_queue; + +extern struct cgraph_varpool_node *cgraph_varpool_first_unanalyzed_node; +extern struct cgraph_varpool_node *cgraph_varpool_last_needed_node; +extern struct cgraph_varpool_node *cgraph_varpool_nodes_queue; +extern struct cgraph_varpool_node *cgraph_varpool_nodes; +extern struct cgraph_asm_node *cgraph_asm_nodes; +extern int cgraph_order; + + +void dump_cgraph (FILE *); +void dump_cgraph_node (FILE *, struct cgraph_node *); +void cgraph_insert_node_to_hashtable (struct cgraph_node *node); +void dump_varpool (FILE *); +void dump_cgraph_varpool_node (FILE *, struct cgraph_varpool_node *); +void cgraph_remove_edge (struct cgraph_edge *); +void cgraph_remove_node (struct cgraph_node *); +void cgraph_node_remove_callees (struct cgraph_node *node); +struct cgraph_edge *cgraph_create_edge (struct cgraph_node *, + struct cgraph_node *, + tree, gcov_type, int); +struct cgraph_node *cgraph_node (tree); +struct cgraph_node *cgraph_node_for_asm (tree asmname); +struct cgraph_edge *cgraph_edge (struct cgraph_node *, tree); +void cgraph_set_call_stmt (struct cgraph_edge *, tree); +struct cgraph_local_info *cgraph_local_info (tree); +struct cgraph_global_info *cgraph_global_info (tree); +struct cgraph_rtl_info *cgraph_rtl_info (tree); +const char * cgraph_node_name (struct cgraph_node *); +struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *, + struct cgraph_node *, + tree, gcov_type, int, unsigned char); +struct cgraph_node * cgraph_clone_node (struct cgraph_node *, gcov_type, + int, unsigned char); + +struct cgraph_varpool_node *cgraph_varpool_node (tree); +struct cgraph_varpool_node *cgraph_varpool_node_for_asm (tree asmname); +void cgraph_varpool_mark_needed_node (struct cgraph_varpool_node *); +void cgraph_varpool_finalize_decl (tree); +void cgraph_redirect_edge_callee (struct cgraph_edge *, struct cgraph_node *); + +struct cgraph_asm_node *cgraph_add_asm_node (tree); + +unsigned char cgraph_function_possibly_inlined_p (tree); +void cgraph_unnest_node (struct cgraph_node *); +void cgraph_varpool_enqueue_needed_node (struct cgraph_varpool_node *); +void cgraph_varpool_reset_queue (void); +unsigned char decide_is_variable_needed (struct cgraph_varpool_node *, tree); + +enum availability cgraph_function_body_availability (struct cgraph_node *); +enum availability cgraph_variable_initializer_availability (struct cgraph_varpool_node *); +unsigned char cgraph_is_master_clone (struct cgraph_node *); +struct cgraph_node *cgraph_master_clone (struct cgraph_node *); +void cgraph_add_new_function (tree); + + +unsigned char cgraph_assemble_pending_functions (void); +unsigned char cgraph_varpool_assemble_pending_decls (void); +void cgraph_finalize_function (tree, unsigned char); +void cgraph_finalize_compilation_unit (void); +void cgraph_optimize (void); +void cgraph_mark_needed_node (struct cgraph_node *); +void cgraph_mark_reachable_node (struct cgraph_node *); +unsigned char cgraph_inline_p (struct cgraph_edge *, const char **reason); +unsigned char cgraph_preserve_function_body_p (tree); +void verify_cgraph (void); +void verify_cgraph_node (struct cgraph_node *); +void cgraph_build_static_cdtor (char which, tree body, int priority); +void cgraph_reset_static_var_maps (void); +void init_cgraph (void); +struct cgraph_node *cgraph_function_versioning (struct cgraph_node *, + VEC_cgraph_edge_p_heap*, + varray_type); +void cgraph_analyze_function (struct cgraph_node *); +struct cgraph_node *save_inline_function_body (struct cgraph_node *); + + +unsigned char cgraph_remove_unreachable_nodes (unsigned char, FILE *); +int cgraph_postorder (struct cgraph_node **); + + +unsigned char cgraph_decide_inlining_incrementally (struct cgraph_node *, unsigned char); +void cgraph_clone_inlined_nodes (struct cgraph_edge *, unsigned char, unsigned char); +void cgraph_mark_inline_edge (struct cgraph_edge *, unsigned char); +unsigned char cgraph_default_inline_p (struct cgraph_node *, const char **); +# 59 "../../GCC/gcc/c-parser.c" 2 + +# 1 "../../GCC/gcc/cbc-tree.h" 1 +# 61 "../../GCC/gcc/c-parser.c" 2 + + + + + +int yydebug; + + + +static int objc_pq_context = 0; + + + + + +static int objc_need_raw_identifier = 0; + + + + + + + +struct resword +{ + const char *word; + __extension__ enum rid rid : 16; + unsigned int disable : 16; +}; +# 98 "../../GCC/gcc/c-parser.c" +static const struct resword reswords[] = +{ + { "_Bool", RID_BOOL, 0 }, + { "_Complex", RID_COMPLEX, 0 }, + { "_Decimal32", RID_DFLOAT32, 0x02 }, + { "_Decimal64", RID_DFLOAT64, 0x02 }, + { "_Decimal128", RID_DFLOAT128, 0x02 }, + { "__FUNCTION__", RID_FUNCTION_NAME, 0 }, + { "__PRETTY_FUNCTION__", RID_PRETTY_FUNCTION_NAME, 0 }, + { "__alignof", RID_ALIGNOF, 0 }, + { "__alignof__", RID_ALIGNOF, 0 }, + { "__asm", RID_ASM, 0 }, + { "__asm__", RID_ASM, 0 }, + { "__attribute", RID_ATTRIBUTE, 0 }, + { "__attribute__", RID_ATTRIBUTE, 0 }, + + + { "__code", RID_CbC_CODE, 0 }, + + { "__builtin_choose_expr", RID_CHOOSE_EXPR, 0 }, + { "__builtin_offsetof", RID_OFFSETOF, 0 }, + { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, 0 }, + { "__builtin_va_arg", RID_VA_ARG, 0 }, + { "__complex", RID_COMPLEX, 0 }, + { "__complex__", RID_COMPLEX, 0 }, + { "__const", RID_CONST, 0 }, + { "__const__", RID_CONST, 0 }, + + + { "__environment", RID_CbC_ENV, 0 }, + + { "__extension__", RID_EXTENSION, 0 }, + { "__func__", RID_C99_FUNCTION_NAME, 0 }, + { "__imag", RID_IMAGPART, 0 }, + { "__imag__", RID_IMAGPART, 0 }, + { "__inline", RID_INLINE, 0 }, + { "__inline__", RID_INLINE, 0 }, + { "__label__", RID_LABEL, 0 }, + { "__real", RID_REALPART, 0 }, + { "__real__", RID_REALPART, 0 }, + { "__restrict", RID_RESTRICT, 0 }, + { "__restrict__", RID_RESTRICT, 0 }, + { "__signed", RID_SIGNED, 0 }, + { "__signed__", RID_SIGNED, 0 }, + { "__thread", RID_THREAD, 0 }, + { "__typeof", RID_TYPEOF, 0 }, + { "__typeof__", RID_TYPEOF, 0 }, + { "__volatile", RID_VOLATILE, 0 }, + { "__volatile__", RID_VOLATILE, 0 }, + { "asm", RID_ASM, 0x02 }, + { "auto", RID_AUTO, 0 }, + { "break", RID_BREAK, 0 }, + { "case", RID_CASE, 0 }, + { "char", RID_CHAR, 0 }, + { "const", RID_CONST, 0 }, + { "continue", RID_CONTINUE, 0 }, + { "default", RID_DEFAULT, 0 }, + { "do", RID_DO, 0 }, + { "double", RID_DOUBLE, 0 }, + { "else", RID_ELSE, 0 }, + { "enum", RID_ENUM, 0 }, + { "extern", RID_EXTERN, 0 }, + { "float", RID_FLOAT, 0 }, + { "for", RID_FOR, 0 }, + { "goto", RID_GOTO, 0 }, + { "if", RID_IF, 0 }, + { "inline", RID_INLINE, 0x04 }, + { "int", RID_INT, 0 }, + { "long", RID_LONG, 0 }, + { "register", RID_REGISTER, 0 }, + { "restrict", RID_RESTRICT, 0x01 }, + { "return", RID_RETURN, 0 }, + { "short", RID_SHORT, 0 }, + { "signed", RID_SIGNED, 0 }, + { "sizeof", RID_SIZEOF, 0 }, + { "static", RID_STATIC, 0 }, + { "struct", RID_STRUCT, 0 }, + { "switch", RID_SWITCH, 0 }, + { "typedef", RID_TYPEDEF, 0 }, + { "typeof", RID_TYPEOF, 0x02 }, + { "union", RID_UNION, 0 }, + { "unsigned", RID_UNSIGNED, 0 }, + { "void", RID_VOID, 0 }, + { "volatile", RID_VOLATILE, 0 }, + { "while", RID_WHILE, 0 }, + + + { "class", RID_AT_CLASS, 0x08 }, + { "compatibility_alias", RID_AT_ALIAS, 0x08 }, + { "defs", RID_AT_DEFS, 0x08 }, + { "encode", RID_AT_ENCODE, 0x08 }, + { "end", RID_AT_END, 0x08 }, + { "implementation", RID_AT_IMPLEMENTATION, 0x08 }, + { "interface", RID_AT_INTERFACE, 0x08 }, + { "private", RID_AT_PRIVATE, 0x08 }, + { "protected", RID_AT_PROTECTED, 0x08 }, + { "protocol", RID_AT_PROTOCOL, 0x08 }, + { "public", RID_AT_PUBLIC, 0x08 }, + { "selector", RID_AT_SELECTOR, 0x08 }, + { "throw", RID_AT_THROW, 0x08 }, + { "try", RID_AT_TRY, 0x08 }, + { "catch", RID_AT_CATCH, 0x08 }, + { "finally", RID_AT_FINALLY, 0x08 }, + { "synchronized", RID_AT_SYNCHRONIZED, 0x08 }, + + + { "bycopy", RID_BYCOPY, 0x08 }, + { "byref", RID_BYREF, 0x08 }, + { "in", RID_IN, 0x08 }, + { "inout", RID_INOUT, 0x08 }, + { "oneway", RID_ONEWAY, 0x08 }, + { "out", RID_OUT, 0x08 }, +}; + + + +typedef enum pragma_omp_clause { + PRAGMA_OMP_CLAUSE_NONE = 0, + + PRAGMA_OMP_CLAUSE_COPYIN, + PRAGMA_OMP_CLAUSE_COPYPRIVATE, + PRAGMA_OMP_CLAUSE_DEFAULT, + PRAGMA_OMP_CLAUSE_FIRSTPRIVATE, + PRAGMA_OMP_CLAUSE_IF, + PRAGMA_OMP_CLAUSE_LASTPRIVATE, + PRAGMA_OMP_CLAUSE_NOWAIT, + PRAGMA_OMP_CLAUSE_NUM_THREADS, + PRAGMA_OMP_CLAUSE_ORDERED, + PRAGMA_OMP_CLAUSE_PRIVATE, + PRAGMA_OMP_CLAUSE_REDUCTION, + PRAGMA_OMP_CLAUSE_SCHEDULE, + PRAGMA_OMP_CLAUSE_SHARED +} pragma_omp_clause; + + + + +void +c_parse_init (void) +{ + + + unsigned int i; + tree id; + int mask = (flag_isoc99 ? 0 : 0x01) + | (flag_no_asm ? (flag_isoc99 ? 0x02 : 0x02|0x04) : 0); + + if (!(c_language & clk_objc)) + mask |= 0x08; + + ridpointers = ((tree *) ggc_alloc_cleared_stat (((int) RID_MAX) * sizeof(tree) )); + for (i = 0; i < (sizeof reswords / sizeof (struct resword)); i++) + { + + + if (reswords[i].disable & mask) + continue; + + id = (__builtin_constant_p (reswords[i].word) ? get_identifier_with_length ((reswords[i].word), strlen (reswords[i].word)) : get_identifier (reswords[i].word)); + (((struct c_common_identifier *) (id))->node.rid_code) = reswords[i].rid; + ((id)->common.lang_flag_0) = 1; + ridpointers [(int) reswords[i].rid] = id; + } +} +# 280 "../../GCC/gcc/c-parser.c" +typedef enum c_id_kind { + + C_ID_ID, + + C_ID_TYPENAME, + + C_ID_CLASSNAME, + + C_ID_NONE +} c_id_kind; + + + +typedef struct c_token +{ + + __extension__ enum cpp_ttype type : 8; + + + __extension__ enum c_id_kind id_kind : 8; + + + __extension__ enum rid keyword : 8; + + + __extension__ enum pragma_kind pragma_kind : 7; + + unsigned int in_system_header : 1; + + tree value; + + location_t location; +} c_token; + + + + +typedef struct c_parser +{ + + c_token tokens[2]; + + short tokens_avail; + + + + unsigned int error : 1; + + + unsigned int in_pragma : 1; +} c_parser; + + + + + +static c_parser *the_parser; + + + + +static void +c_lex_one_token (c_token *token) +{ + do { if (timevar_enable) timevar_push_1 (TV_LEX); }while(0); + + token->type = c_lex_with_flags (&token->value, &token->location, ((void *)0)); + token->id_kind = C_ID_NONE; + token->keyword = RID_MAX; + token->pragma_kind = PRAGMA_NONE; + token->in_system_header = in_system_header; + + switch (token->type) + { + case CPP_NAME: + { + tree decl; + + int objc_force_identifier = objc_need_raw_identifier; + do { if ((c_language & clk_objc)) objc_need_raw_identifier = 0; } while (0); + + if (((token->value)->common.lang_flag_0)) + { + enum rid rid_code = (((struct c_common_identifier *) (token->value))->node.rid_code); + + if ((c_language & clk_objc)) + { + if (!((unsigned int) (rid_code) >= (unsigned int) RID_FIRST_AT && (unsigned int) (rid_code) <= (unsigned int) RID_LAST_AT) + && (!((unsigned int) (rid_code) >= (unsigned int) RID_FIRST_PQ && (unsigned int) (rid_code) <= (unsigned int) RID_LAST_PQ) || objc_pq_context)) + { + + token->value = ridpointers[(int) rid_code]; + token->type = ((enum cpp_ttype) (N_TTYPES + 1)); + token->keyword = rid_code; + break; + } + } + else + { + + token->value = ridpointers[(int) rid_code]; + token->type = ((enum cpp_ttype) (N_TTYPES + 1)); + token->keyword = rid_code; + break; + } + } + + decl = lookup_name (token->value); + if (decl) + { + if (((enum tree_code) (decl)->common.code) == TYPE_DECL) + { + token->id_kind = C_ID_TYPENAME; + break; + } + } + else if ((c_language & clk_objc)) + { + tree objc_interface_decl = objc_is_class_name (token->value); + + + + if (objc_interface_decl + && (global_bindings_p () + || (!objc_force_identifier && !decl))) + { + token->value = objc_interface_decl; + token->id_kind = C_ID_CLASSNAME; + break; + } + } + token->id_kind = C_ID_ID; + } + break; + case CPP_AT_NAME: + + token->type = ((enum cpp_ttype) (N_TTYPES + 1)); + token->keyword = (((struct c_common_identifier *) (token->value))->node.rid_code); + break; + case CPP_COLON: + case CPP_COMMA: + case CPP_CLOSE_PAREN: + case CPP_SEMICOLON: + + + do { if ((c_language & clk_objc)) objc_need_raw_identifier = 0; } while (0); + break; + case CPP_PRAGMA: + + token->pragma_kind = ((__extension__ ({ const tree __t = (token->value); if (((enum tree_code) (__t)->common.code) != (INTEGER_CST)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 429, __FUNCTION__, (INTEGER_CST), 0); __t; })->int_cst.int_cst).low); + token->value = ((void *)0); + break; + default: + break; + } + do { if (timevar_enable) timevar_pop_1 (TV_LEX); }while(0); +} + + + + +static __inline__ c_token * +c_parser_peek_token (c_parser *parser) +{ + if (parser->tokens_avail == 0) + { + c_lex_one_token (&parser->tokens[0]); + parser->tokens_avail = 1; + } + return &parser->tokens[0]; +} + + + + +static __inline__ unsigned char +c_parser_next_token_is (c_parser *parser, enum cpp_ttype type) +{ + return c_parser_peek_token (parser)->type == type; +} + + + + +static __inline__ unsigned char +c_parser_next_token_is_not (c_parser *parser, enum cpp_ttype type) +{ + return !c_parser_next_token_is (parser, type); +} + + + + +static __inline__ unsigned char +c_parser_next_token_is_keyword (c_parser *parser, enum rid keyword) +{ + c_token *token; + + + token = c_parser_peek_token (parser); + + return token->keyword == keyword; +} + + + +static unsigned char +c_token_starts_typename (c_token *token) +{ + switch (token->type) + { + case CPP_NAME: + switch (token->id_kind) + { + case C_ID_ID: + return 0; + case C_ID_TYPENAME: + return 1; + case C_ID_CLASSNAME: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 499, __FUNCTION__), 0 : 0)); + return 1; + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 502, __FUNCTION__)); + } + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (token->keyword) + { + case RID_UNSIGNED: + case RID_LONG: + case RID_SHORT: + case RID_SIGNED: + case RID_COMPLEX: + case RID_INT: + case RID_CHAR: + case RID_FLOAT: + case RID_DOUBLE: + case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: + case RID_BOOL: + case RID_ENUM: + case RID_STRUCT: + case RID_UNION: + case RID_TYPEOF: + case RID_CONST: + case RID_VOLATILE: + case RID_RESTRICT: + case RID_ATTRIBUTE: + + case RID_CbC_CODE: + + return 1; + default: + return 0; + } + case CPP_LESS: + if ((c_language & clk_objc)) + return 1; + return 0; + default: + return 0; + } +} + + + +static __inline__ unsigned char +c_parser_next_token_starts_typename (c_parser *parser) +{ + c_token *token = c_parser_peek_token (parser); + return c_token_starts_typename (token); +} + + + +static unsigned char +c_token_starts_declspecs (c_token *token) +{ + switch (token->type) + { + case CPP_NAME: + switch (token->id_kind) + { + case C_ID_ID: + return 0; + case C_ID_TYPENAME: + return 1; + case C_ID_CLASSNAME: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 569, __FUNCTION__), 0 : 0)); + return 1; + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 572, __FUNCTION__)); + } + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (token->keyword) + { + case RID_STATIC: + case RID_EXTERN: + case RID_REGISTER: + case RID_TYPEDEF: + case RID_INLINE: + case RID_AUTO: + case RID_THREAD: + case RID_UNSIGNED: + case RID_LONG: + case RID_SHORT: + case RID_SIGNED: + case RID_COMPLEX: + case RID_INT: + case RID_CHAR: + case RID_FLOAT: + case RID_DOUBLE: + case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: + case RID_BOOL: + case RID_ENUM: + case RID_STRUCT: + case RID_UNION: + case RID_TYPEOF: + case RID_CONST: + case RID_VOLATILE: + case RID_RESTRICT: + case RID_ATTRIBUTE: + + case RID_CbC_CODE: + + return 1; + default: + return 0; + } + case CPP_LESS: + if ((c_language & clk_objc)) + return 1; + return 0; + default: + return 0; + } +} + + + +static __inline__ unsigned char +c_parser_next_token_starts_declspecs (c_parser *parser) +{ + c_token *token = c_parser_peek_token (parser); + return c_token_starts_declspecs (token); +} + + + + +static c_token * +c_parser_peek_2nd_token (c_parser *parser) +{ + if (parser->tokens_avail >= 2) + return &parser->tokens[1]; + ((void)(!(parser->tokens_avail == 1) ? fancy_abort ("../../GCC/gcc/c-parser.c", 639, __FUNCTION__), 0 : 0)); + ((void)(!(parser->tokens[0].type != CPP_EOF) ? fancy_abort ("../../GCC/gcc/c-parser.c", 640, __FUNCTION__), 0 : 0)); + ((void)(!(parser->tokens[0].type != CPP_PRAGMA_EOL) ? fancy_abort ("../../GCC/gcc/c-parser.c", 641, __FUNCTION__), 0 : 0)); + c_lex_one_token (&parser->tokens[1]); + parser->tokens_avail = 2; + return &parser->tokens[1]; +} + + + +static void +c_parser_consume_token (c_parser *parser) +{ + ((void)(!(parser->tokens_avail >= 1) ? fancy_abort ("../../GCC/gcc/c-parser.c", 652, __FUNCTION__), 0 : 0)); + ((void)(!(parser->tokens[0].type != CPP_EOF) ? fancy_abort ("../../GCC/gcc/c-parser.c", 653, __FUNCTION__), 0 : 0)); + ((void)(!(!parser->in_pragma || parser->tokens[0].type != CPP_PRAGMA_EOL) ? fancy_abort ("../../GCC/gcc/c-parser.c", 654, __FUNCTION__), 0 : 0)); + ((void)(!(parser->error || parser->tokens[0].type != CPP_PRAGMA) ? fancy_abort ("../../GCC/gcc/c-parser.c", 655, __FUNCTION__), 0 : 0)); + if (parser->tokens_avail == 2) + parser->tokens[0] = parser->tokens[1]; + parser->tokens_avail--; +} + + + + +static void +c_parser_consume_pragma (c_parser *parser) +{ + ((void)(!(!parser->in_pragma) ? fancy_abort ("../../GCC/gcc/c-parser.c", 667, __FUNCTION__), 0 : 0)); + ((void)(!(parser->tokens_avail >= 1) ? fancy_abort ("../../GCC/gcc/c-parser.c", 668, __FUNCTION__), 0 : 0)); + ((void)(!(parser->tokens[0].type == CPP_PRAGMA) ? fancy_abort ("../../GCC/gcc/c-parser.c", 669, __FUNCTION__), 0 : 0)); + if (parser->tokens_avail == 2) + parser->tokens[0] = parser->tokens[1]; + parser->tokens_avail--; + parser->in_pragma = 1; +} + + + +static __inline__ void +c_parser_set_source_position_from_token (c_token *token) +{ + if (token->type != CPP_EOF) + { + input_location = token->location; + in_system_header = token->in_system_header; + } +} +# 700 "../../GCC/gcc/c-parser.c" +static void +c_parser_error (c_parser *parser, const char *gmsgid) +{ + c_token *token = c_parser_peek_token (parser); + if (parser->error) + return; + parser->error = 1; + if (!gmsgid) + return; + + + c_parser_set_source_position_from_token (token); + c_parse_error (gmsgid, + + + + (token->type == ((enum cpp_ttype) (N_TTYPES + 1)) ? CPP_NAME : token->type), + token->value); +} + + + + + + +static unsigned char +c_parser_require (c_parser *parser, + enum cpp_ttype type, + const char *msgid) +{ + if (c_parser_next_token_is (parser, type)) + { + c_parser_consume_token (parser); + return 1; + } + else + { + c_parser_error (parser, msgid); + return 0; + } +} + + + + +static unsigned char +c_parser_require_keyword (c_parser *parser, + enum rid keyword, + const char *msgid) +{ + if (c_parser_next_token_is_keyword (parser, keyword)) + { + c_parser_consume_token (parser); + return 1; + } + else + { + c_parser_error (parser, msgid); + return 0; + } +} + + + + + + + +static void +c_parser_skip_until_found (c_parser *parser, + enum cpp_ttype type, + const char *msgid) +{ + unsigned nesting_depth = 0; + + if (c_parser_require (parser, type, msgid)) + return; + + + while (1) + { + + c_token *token = c_parser_peek_token (parser); + + if (token->type == type && !nesting_depth) + { + c_parser_consume_token (parser); + break; + } + + + if (token->type == CPP_EOF) + return; + if (token->type == CPP_PRAGMA_EOL && parser->in_pragma) + return; + if (token->type == CPP_OPEN_BRACE + || token->type == CPP_OPEN_PAREN + || token->type == CPP_OPEN_SQUARE) + ++nesting_depth; + else if (token->type == CPP_CLOSE_BRACE + || token->type == CPP_CLOSE_PAREN + || token->type == CPP_CLOSE_SQUARE) + { + if (nesting_depth-- == 0) + break; + } + + c_parser_consume_token (parser); + } + parser->error = 0; +} + + + + +static void +c_parser_skip_to_end_of_parameter (c_parser *parser) +{ + unsigned nesting_depth = 0; + + while (1) + { + c_token *token = c_parser_peek_token (parser); + if ((token->type == CPP_COMMA || token->type == CPP_SEMICOLON) + && !nesting_depth) + break; + + if (token->type == CPP_EOF) + return; + if (token->type == CPP_PRAGMA_EOL && parser->in_pragma) + return; + if (token->type == CPP_OPEN_BRACE + || token->type == CPP_OPEN_PAREN + || token->type == CPP_OPEN_SQUARE) + ++nesting_depth; + else if (token->type == CPP_CLOSE_BRACE + || token->type == CPP_CLOSE_PAREN + || token->type == CPP_CLOSE_SQUARE) + { + if (nesting_depth-- == 0) + break; + } + + c_parser_consume_token (parser); + } + parser->error = 0; +} + + + + +static void +c_parser_skip_to_pragma_eol (c_parser *parser) +{ + ((void)(!(parser->in_pragma) ? fancy_abort ("../../GCC/gcc/c-parser.c", 854, __FUNCTION__), 0 : 0)); + parser->in_pragma = 0; + + if (!c_parser_require (parser, CPP_PRAGMA_EOL, "expected end of line")) + while (1) + { + c_token *token = c_parser_peek_token (parser); + if (token->type == CPP_EOF) + break; + if (token->type == CPP_PRAGMA_EOL) + { + c_parser_consume_token (parser); + break; + } + c_parser_consume_token (parser); + } + + parser->error = 0; +} + + + + +static void +c_parser_skip_to_end_of_block_or_statement (c_parser *parser) +{ + unsigned nesting_depth = 0; + unsigned char save_error = parser->error; + + while (1) + { + c_token *token; + + + token = c_parser_peek_token (parser); + + switch (token->type) + { + case CPP_EOF: + return; + + case CPP_PRAGMA_EOL: + if (parser->in_pragma) + return; + break; + + case CPP_SEMICOLON: + + + if (!nesting_depth) + { + + c_parser_consume_token (parser); + goto finished; + } + break; + + case CPP_CLOSE_BRACE: + + + if (nesting_depth == 0 || --nesting_depth == 0) + { + c_parser_consume_token (parser); + goto finished; + } + break; + + case CPP_OPEN_BRACE: + + + ++nesting_depth; + break; + + case CPP_PRAGMA: + + + + + + + c_parser_consume_pragma (parser); + c_parser_skip_to_pragma_eol (parser); + parser->error = save_error; + continue; + + default: + break; + } + + c_parser_consume_token (parser); + } + + finished: + parser->error = 0; +} + + + +static __inline__ int +disable_extension_diagnostics (void) +{ + int ret = (pedantic + | (warn_pointer_arith << 1) + | (warn_traditional << 2) + | (flag_iso << 3)); + pedantic = 0; + warn_pointer_arith = 0; + warn_traditional = 0; + flag_iso = 0; + return ret; +} + + + + +static __inline__ void +restore_extension_diagnostics (int flags) +{ + pedantic = flags & 1; + warn_pointer_arith = (flags >> 1) & 1; + warn_traditional = (flags >> 2) & 1; + flag_iso = (flags >> 3) & 1; +} + + +typedef enum c_dtr_syn { + + C_DTR_NORMAL, + + C_DTR_ABSTRACT, +# 994 "../../GCC/gcc/c-parser.c" + C_DTR_PARM +} c_dtr_syn; + +static void c_parser_external_declaration (c_parser *); +static void c_parser_asm_definition (c_parser *); +static void c_parser_declaration_or_fndef (c_parser *, unsigned char, unsigned char, unsigned char, unsigned char); +static void c_parser_declspecs (c_parser *, struct c_declspecs *, unsigned char, unsigned char, + unsigned char); +static struct c_typespec c_parser_enum_specifier (c_parser *); +static struct c_typespec c_parser_struct_or_union_specifier (c_parser *); +static tree c_parser_struct_declaration (c_parser *); +static struct c_typespec c_parser_typeof_specifier (c_parser *); +static struct c_declarator *c_parser_declarator (c_parser *, unsigned char, c_dtr_syn, + unsigned char *); +static struct c_declarator *c_parser_direct_declarator (c_parser *, unsigned char, + c_dtr_syn, unsigned char *); +static struct c_declarator *c_parser_direct_declarator_inner (c_parser *, + unsigned char, + struct c_declarator *); +static struct c_arg_info *c_parser_parms_declarator (c_parser *, unsigned char, tree); +static struct c_arg_info *c_parser_parms_list_declarator (c_parser *, tree); +static struct c_parm *c_parser_parameter_declaration (c_parser *, tree); +static tree c_parser_simple_asm_expr (c_parser *); +static tree c_parser_attributes (c_parser *); +static struct c_type_name *c_parser_type_name (c_parser *); +static struct c_expr c_parser_initializer (c_parser *); +static struct c_expr c_parser_braced_init (c_parser *, tree, unsigned char); +static void c_parser_initelt (c_parser *); +static void c_parser_initval (c_parser *, struct c_expr *); +static tree c_parser_compound_statement (c_parser *); +static void c_parser_compound_statement_nostart (c_parser *); +static void c_parser_label (c_parser *); +static void c_parser_statement (c_parser *); +static void c_parser_statement_after_labels (c_parser *); +static void c_parser_if_statement (c_parser *); +static void c_parser_switch_statement (c_parser *); +static void c_parser_while_statement (c_parser *); +static void c_parser_do_statement (c_parser *); +static void c_parser_for_statement (c_parser *); +static tree c_parser_asm_statement (c_parser *); +static tree c_parser_asm_operands (c_parser *, unsigned char); +static tree c_parser_asm_clobbers (c_parser *); +static struct c_expr c_parser_expr_no_commas (c_parser *, struct c_expr *); +static struct c_expr c_parser_conditional_expression (c_parser *, + struct c_expr *); +static struct c_expr c_parser_binary_expression (c_parser *, struct c_expr *); +static struct c_expr c_parser_cast_expression (c_parser *, struct c_expr *); +static struct c_expr c_parser_unary_expression (c_parser *); +static struct c_expr c_parser_sizeof_expression (c_parser *); +static struct c_expr c_parser_alignof_expression (c_parser *); +static struct c_expr c_parser_postfix_expression (c_parser *); +static struct c_expr c_parser_postfix_expression_after_paren_type (c_parser *, + struct c_type_name *); +static struct c_expr c_parser_postfix_expression_after_primary (c_parser *, + struct c_expr); +static struct c_expr c_parser_expression (c_parser *); +static struct c_expr c_parser_expression_conv (c_parser *); +static tree c_parser_expr_list (c_parser *, unsigned char); +static void c_parser_omp_construct (c_parser *); +static void c_parser_omp_threadprivate (c_parser *); +static void c_parser_omp_barrier (c_parser *); +static void c_parser_omp_flush (c_parser *); + +enum pragma_context { pragma_external, pragma_stmt, pragma_compound }; +static unsigned char c_parser_pragma (c_parser *, enum pragma_context); + + + +static void c_parser_objc_class_definition (c_parser *); +static void c_parser_objc_class_instance_variables (c_parser *); +static void c_parser_objc_class_declaration (c_parser *); +static void c_parser_objc_alias_declaration (c_parser *); +static void c_parser_objc_protocol_definition (c_parser *); +static enum tree_code c_parser_objc_method_type (c_parser *); +static void c_parser_objc_method_definition (c_parser *); +static void c_parser_objc_methodprotolist (c_parser *); +static void c_parser_objc_methodproto (c_parser *); +static tree c_parser_objc_method_decl (c_parser *); +static tree c_parser_objc_type_name (c_parser *); +static tree c_parser_objc_protocol_refs (c_parser *); +static void c_parser_objc_try_catch_statement (c_parser *); +static void c_parser_objc_synchronized_statement (c_parser *); +static tree c_parser_objc_selector (c_parser *); +static tree c_parser_objc_selector_arg (c_parser *); +static tree c_parser_objc_receiver (c_parser *); +static tree c_parser_objc_message_args (c_parser *); +static tree c_parser_objc_keywordexpr (c_parser *); +# 1097 "../../GCC/gcc/c-parser.c" +static void +c_parser_translation_unit (c_parser *parser) +{ + if (c_parser_next_token_is (parser, CPP_EOF)) + { + if (pedantic) + pedwarn ("ISO C forbids an empty source file"); + } + else + { + void *obstack_position = __extension__ ({ struct obstack *__h = (&parser_obstack); __extension__ ({ struct obstack *__o = (__h); int __len = ((0)); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); }); + do + { + ggc_collect (); + c_parser_external_declaration (parser); + __extension__ ({ struct obstack *__o = (&parser_obstack); void *__obj = (void *) (obstack_position); if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) __o->next_free = __o->object_base = (char *) __obj; else (obstack_free) (__o, __obj); }); + } + while (c_parser_next_token_is_not (parser, CPP_EOF)); + } +} +# 1142 "../../GCC/gcc/c-parser.c" +static void +c_parser_external_declaration (c_parser *parser) +{ + int ext; + switch (c_parser_peek_token (parser)->type) + { + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (c_parser_peek_token (parser)->keyword) + { + case RID_EXTENSION: + ext = disable_extension_diagnostics (); + c_parser_consume_token (parser); + c_parser_external_declaration (parser); + restore_extension_diagnostics (ext); + break; + case RID_ASM: + c_parser_asm_definition (parser); + break; + case RID_AT_INTERFACE: + case RID_AT_IMPLEMENTATION: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1162, __FUNCTION__), 0 : 0)); + c_parser_objc_class_definition (parser); + break; + case RID_AT_CLASS: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1166, __FUNCTION__), 0 : 0)); + c_parser_objc_class_declaration (parser); + break; + case RID_AT_ALIAS: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1170, __FUNCTION__), 0 : 0)); + c_parser_objc_alias_declaration (parser); + break; + case RID_AT_PROTOCOL: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1174, __FUNCTION__), 0 : 0)); + c_parser_objc_protocol_definition (parser); + break; + case RID_AT_END: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1178, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + objc_finish_implementation (); + break; + default: + goto decl_or_fndef; + } + break; + case CPP_SEMICOLON: + if (pedantic) + pedwarn ("ISO C does not allow extra %<;%> outside of a function"); + c_parser_consume_token (parser); + break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_external); + break; + case CPP_PLUS: + case CPP_MINUS: + if ((c_language & clk_objc)) + { + c_parser_objc_method_definition (parser); + break; + } + + + default: + decl_or_fndef: + + + + c_parser_declaration_or_fndef (parser, 1, 1, 0, 1); + break; + } +} +# 1271 "../../GCC/gcc/c-parser.c" +static void +c_parser_declaration_or_fndef (c_parser *parser, unsigned char fndef_ok, unsigned char empty_ok, + unsigned char nested, unsigned char start_attr_ok) +{ + struct c_declspecs *specs; + tree prefix_attrs; + tree all_prefix_attrs; + unsigned char diagnosed_no_specs = 0; + + specs = build_null_declspecs (); + c_parser_declspecs (parser, specs, 1, 1, start_attr_ok); + if (parser->error) + { + c_parser_skip_to_end_of_block_or_statement (parser); + return; + } + if (nested && !specs->declspecs_seen_p) + { + c_parser_error (parser, "expected declaration specifiers"); + c_parser_skip_to_end_of_block_or_statement (parser); + return; + } + finish_declspecs (specs); + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + if (empty_ok) + shadow_tag (specs); + else + { + shadow_tag_warned (specs, 1); + pedwarn ("empty declaration"); + } + c_parser_consume_token (parser); + return; + } + pending_xref_error (); + prefix_attrs = specs->attrs; + all_prefix_attrs = prefix_attrs; + specs->attrs = (tree) ((void *)0); + while (1) + { + struct c_declarator *declarator; + unsigned char dummy = 0; + tree fnbody; + + + + + declarator = c_parser_declarator (parser, specs->type_seen_p, + C_DTR_NORMAL, &dummy); + if (declarator == ((void *)0)) + { + c_parser_skip_to_end_of_block_or_statement (parser); + return; + } + if (c_parser_next_token_is (parser, CPP_EQ) + || c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is_keyword (parser, RID_ASM) + || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + { + tree asm_name = (tree) ((void *)0); + tree postfix_attrs = (tree) ((void *)0); + if (!diagnosed_no_specs && !specs->declspecs_seen_p) + { + diagnosed_no_specs = 1; + pedwarn ("data definition has no type or storage class"); + } + + + fndef_ok = 0; + if (c_parser_next_token_is_keyword (parser, RID_ASM)) + asm_name = c_parser_simple_asm_expr (parser); + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + postfix_attrs = c_parser_attributes (parser); + if (c_parser_next_token_is (parser, CPP_EQ)) + { + tree d; + struct c_expr init; + c_parser_consume_token (parser); + + + d = start_decl (declarator, specs, 1, + chainon (postfix_attrs, all_prefix_attrs)); + if (!d) + d = global_trees[TI_ERROR_MARK]; + start_init (d, asm_name, global_bindings_p ()); + init = c_parser_initializer (parser); + finish_init (); + if (d != global_trees[TI_ERROR_MARK]) + { + maybe_warn_string_init (((d)->common.type), init); + finish_decl (d, init.value, asm_name); + } + } + else + { + tree d = start_decl (declarator, specs, 0, + chainon (postfix_attrs, + all_prefix_attrs)); + if (d) + finish_decl (d, (tree) ((void *)0), asm_name); + } + if (c_parser_next_token_is (parser, CPP_COMMA)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + all_prefix_attrs = chainon (c_parser_attributes (parser), + prefix_attrs); + else + all_prefix_attrs = prefix_attrs; + continue; + } + else if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + c_parser_consume_token (parser); + return; + } + else + { + c_parser_error (parser, "expected %<,%> or %<;%>"); + c_parser_skip_to_end_of_block_or_statement (parser); + return; + } + } + else if (!fndef_ok) + { + c_parser_error (parser, "expected %<=%>, %<,%>, %<;%>, " + "% or %<__attribute__%>"); + c_parser_skip_to_end_of_block_or_statement (parser); + return; + } + + if (nested) + { + if (pedantic) + pedwarn ("ISO C forbids nested functions"); + push_function_context (); + } + if (!start_function (specs, declarator, all_prefix_attrs)) + { + + + + c_parser_error (parser, "expected %<=%>, %<,%>, %<;%>, % " + "or %<__attribute__%>"); + if (nested) + pop_function_context (); + break; + } +# 1433 "../../GCC/gcc/c-parser.c" + while (c_parser_next_token_is_not (parser, CPP_EOF) + && c_parser_next_token_is_not (parser, CPP_OPEN_BRACE)) + c_parser_declaration_or_fndef (parser, 0, 0, 1, 0); + (__extension__ ({ const tree __t = (current_function_decl); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_MINIMAL)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_MINIMAL), "../../GCC/gcc/c-parser.c", 1436, __FUNCTION__); __t; })->decl_minimal.locus) + = c_parser_peek_token (parser)->location; + store_parm_decls (); + fnbody = c_parser_compound_statement (parser); + if (nested) + { + tree decl = current_function_decl; + add_stmt (fnbody); + finish_function (); + pop_function_context (); + add_stmt (build_stmt (DECL_EXPR, decl)); + } + else + { + add_stmt (fnbody); + finish_function (); + } + break; + } +} +# 1464 "../../GCC/gcc/c-parser.c" +static void +c_parser_asm_definition (c_parser *parser) +{ + tree asm_str = c_parser_simple_asm_expr (parser); + if (asm_str) + cgraph_add_asm_node (asm_str); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); +} +# 1551 "../../GCC/gcc/c-parser.c" +static void +c_parser_declspecs (c_parser *parser, struct c_declspecs *specs, + unsigned char scspec_ok, unsigned char typespec_ok, unsigned char start_attr_ok) +{ + unsigned char attrs_ok = start_attr_ok; + unsigned char seen_type = specs->type_seen_p; + while (c_parser_next_token_is (parser, CPP_NAME) + || c_parser_next_token_is (parser, ((enum cpp_ttype) (N_TTYPES + 1))) + || ((c_language & clk_objc) && c_parser_next_token_is (parser, CPP_LESS))) + { + struct c_typespec t; + tree attrs; + if (c_parser_next_token_is (parser, CPP_NAME)) + { + tree value = c_parser_peek_token (parser)->value; + c_id_kind kind = c_parser_peek_token (parser)->id_kind; + + + + if (!typespec_ok || seen_type + || (kind != C_ID_TYPENAME && kind != C_ID_CLASSNAME)) + break; + c_parser_consume_token (parser); + seen_type = 1; + attrs_ok = 1; + if (kind == C_ID_TYPENAME + && (!(c_language & clk_objc) + || c_parser_next_token_is_not (parser, CPP_LESS))) + { + t.kind = ctsk_typedef; + + + t.spec = lookup_name (value); + } + else + { + tree proto = (tree) ((void *)0); + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1588, __FUNCTION__), 0 : 0)); + t.kind = ctsk_objc; + if (c_parser_next_token_is (parser, CPP_LESS)) + proto = c_parser_objc_protocol_refs (parser); + t.spec = objc_get_protocol_qualified_type (value, proto); + } + declspecs_add_type (specs, t); + continue; + } + if (c_parser_next_token_is (parser, CPP_LESS)) + { + + + tree proto; + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1602, __FUNCTION__), 0 : 0)); + if (!typespec_ok || seen_type) + break; + proto = c_parser_objc_protocol_refs (parser); + t.kind = ctsk_objc; + t.spec = objc_get_protocol_qualified_type ((tree) ((void *)0), proto); + declspecs_add_type (specs, t); + continue; + } + ((void)(!(c_parser_next_token_is (parser, ((enum cpp_ttype) (N_TTYPES + 1)))) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1611, __FUNCTION__), 0 : 0)); + switch (c_parser_peek_token (parser)->keyword) + { + case RID_STATIC: + case RID_EXTERN: + case RID_REGISTER: + case RID_TYPEDEF: + case RID_INLINE: + case RID_AUTO: + case RID_THREAD: + if (!scspec_ok) + goto out; + attrs_ok = 1; + + + + declspecs_add_scspec (specs, c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + break; + case RID_UNSIGNED: + case RID_LONG: + case RID_SHORT: + case RID_SIGNED: + case RID_COMPLEX: + case RID_INT: + case RID_CHAR: + case RID_FLOAT: + case RID_DOUBLE: + case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: + case RID_BOOL: + + case RID_CbC_CODE: + + if (!typespec_ok) + goto out; + attrs_ok = 1; + seen_type = 1; + do { if ((c_language & clk_objc)) objc_need_raw_identifier = 1; } while (0); + t.kind = ctsk_resword; + t.spec = c_parser_peek_token (parser)->value; + declspecs_add_type (specs, t); + c_parser_consume_token (parser); + break; + case RID_ENUM: + if (!typespec_ok) + goto out; + attrs_ok = 1; + seen_type = 1; + t = c_parser_enum_specifier (parser); + declspecs_add_type (specs, t); + break; + case RID_STRUCT: + case RID_UNION: + if (!typespec_ok) + goto out; + attrs_ok = 1; + seen_type = 1; + t = c_parser_struct_or_union_specifier (parser); + declspecs_add_type (specs, t); + break; + case RID_TYPEOF: + + + + if (!typespec_ok || seen_type) + goto out; + attrs_ok = 1; + seen_type = 1; + t = c_parser_typeof_specifier (parser); + declspecs_add_type (specs, t); + break; + case RID_CONST: + case RID_VOLATILE: + case RID_RESTRICT: + attrs_ok = 1; + declspecs_add_qual (specs, c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + break; + case RID_ATTRIBUTE: + if (!attrs_ok) + goto out; + attrs = c_parser_attributes (parser); + declspecs_add_attrs (specs, attrs); + break; + default: + goto out; + } + } + out: ; +} +# 1727 "../../GCC/gcc/c-parser.c" +static struct c_typespec +c_parser_enum_specifier (c_parser *parser) +{ + struct c_typespec ret; + tree attrs; + tree ident = (tree) ((void *)0); + ((void)(!(c_parser_next_token_is_keyword (parser, RID_ENUM)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1733, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + attrs = c_parser_attributes (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + ident = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + + tree type = start_enum (ident); + tree postfix_attrs; + + + tree values = (tree) ((void *)0); + c_parser_consume_token (parser); + while (1) + { + tree enum_id; + tree enum_value; + tree enum_decl; + unsigned char seen_comma; + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, ((void *)0)); + values = global_trees[TI_ERROR_MARK]; + break; + } + enum_id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_EQ)) + { + c_parser_consume_token (parser); + enum_value = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + else + enum_value = (tree) ((void *)0); + enum_decl = build_enumerator (enum_id, enum_value); + ((enum_decl)->common.chain) = values; + values = enum_decl; + seen_comma = 0; + if (c_parser_next_token_is (parser, CPP_COMMA)) + { + seen_comma = 1; + c_parser_consume_token (parser); + } + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + if (seen_comma && pedantic && !flag_isoc99) + pedwarn ("comma at end of enumerator list"); + c_parser_consume_token (parser); + break; + } + if (!seen_comma) + { + c_parser_error (parser, "expected %<,%> or %<}%>"); + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, ((void *)0)); + values = global_trees[TI_ERROR_MARK]; + break; + } + } + postfix_attrs = c_parser_attributes (parser); + ret.spec = finish_enum (type, nreverse (values), + chainon (attrs, postfix_attrs)); + ret.kind = ctsk_tagdef; + return ret; + } + else if (!ident) + { + c_parser_error (parser, "expected %<{%>"); + ret.spec = global_trees[TI_ERROR_MARK]; + ret.kind = ctsk_tagref; + return ret; + } + ret = parser_xref_tag (ENUMERAL_TYPE, ident); + + + if (pedantic && !((__extension__ ({ const tree __t = (ret.spec); if (tree_code_type[(int) (((enum tree_code) (__t)->common.code))] != (tcc_type)) tree_class_check_failed (__t, (tcc_type), "../../GCC/gcc/c-parser.c", 1812, __FUNCTION__); __t; })->type.size) != (tree) ((void *)0))) + pedwarn ("ISO C forbids forward references to % types"); + return ret; +} +# 1856 "../../GCC/gcc/c-parser.c" +static struct c_typespec +c_parser_struct_or_union_specifier (c_parser *parser) +{ + struct c_typespec ret; + tree attrs; + tree ident = (tree) ((void *)0); + enum tree_code code; + switch (c_parser_peek_token (parser)->keyword) + { + case RID_STRUCT: + code = RECORD_TYPE; + break; + case RID_UNION: + code = UNION_TYPE; + break; + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 1872, __FUNCTION__)); + } + c_parser_consume_token (parser); + attrs = c_parser_attributes (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + ident = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + + + tree type = start_struct (code, ident); + tree postfix_attrs; +# 1897 "../../GCC/gcc/c-parser.c" + tree contents = (tree) ((void *)0); + c_parser_consume_token (parser); + + + if (c_parser_next_token_is_keyword (parser, RID_AT_DEFS)) + { + tree name; + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 1904, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + goto end_at_defs; + if (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_token (parser)->id_kind == C_ID_CLASSNAME) + { + name = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else + { + c_parser_error (parser, "expected class name"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + goto end_at_defs; + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + contents = nreverse (objc_get_class_ivars (name)); + } + end_at_defs: + + + + while (1) + { + tree decls; + + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + if (pedantic) + pedwarn ("extra semicolon in struct or union specified"); + c_parser_consume_token (parser); + continue; + } + + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + c_parser_consume_token (parser); + break; + } + + if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + c_parser_pragma (parser, pragma_external); + continue; + } + + + decls = c_parser_struct_declaration (parser); + contents = chainon (decls, contents); + + + + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + c_parser_consume_token (parser); + else + { + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + pedwarn ("no semicolon at end of struct or union"); + else + { + c_parser_error (parser, "expected %<;%>"); + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, ((void *)0)); + break; + } + } + } + postfix_attrs = c_parser_attributes (parser); + ret.spec = finish_struct (type, nreverse (contents), + chainon (attrs, postfix_attrs)); + ret.kind = ctsk_tagdef; + return ret; + } + else if (!ident) + { + c_parser_error (parser, "expected %<{%>"); + ret.spec = global_trees[TI_ERROR_MARK]; + ret.kind = ctsk_tagref; + return ret; + } + ret = parser_xref_tag (code, ident); + return ret; +} +# 2020 "../../GCC/gcc/c-parser.c" +static tree +c_parser_struct_declaration (c_parser *parser) +{ + struct c_declspecs *specs; + tree prefix_attrs; + tree all_prefix_attrs; + tree decls; + if (c_parser_next_token_is_keyword (parser, RID_EXTENSION)) + { + int ext; + tree decl; + ext = disable_extension_diagnostics (); + c_parser_consume_token (parser); + decl = c_parser_struct_declaration (parser); + restore_extension_diagnostics (ext); + return decl; + } + specs = build_null_declspecs (); + c_parser_declspecs (parser, specs, 0, 1, 1); + if (parser->error) + return (tree) ((void *)0); + if (!specs->declspecs_seen_p) + { + c_parser_error (parser, "expected specifier-qualifier-list"); + return (tree) ((void *)0); + } + finish_declspecs (specs); + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + tree ret; + if (!specs->type_seen_p) + { + if (pedantic) + pedwarn ("ISO C forbids member declarations with no members"); + shadow_tag_warned (specs, pedantic); + ret = (tree) ((void *)0); + } + else + { + + + + ret = grokfield (build_id_declarator ((tree) ((void *)0)), specs, (tree) ((void *)0)); + } + return ret; + } + pending_xref_error (); + prefix_attrs = specs->attrs; + all_prefix_attrs = prefix_attrs; + specs->attrs = (tree) ((void *)0); + decls = (tree) ((void *)0); + while (1) + { + + struct c_declarator *declarator; + unsigned char dummy = 0; + if (c_parser_next_token_is (parser, CPP_COLON)) + declarator = build_id_declarator ((tree) ((void *)0)); + else + declarator = c_parser_declarator (parser, specs->type_seen_p, + C_DTR_NORMAL, &dummy); + if (declarator == ((void *)0)) + { + c_parser_skip_to_end_of_block_or_statement (parser); + break; + } + if (c_parser_next_token_is (parser, CPP_COLON) + || c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is (parser, CPP_CLOSE_BRACE) + || c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + { + tree postfix_attrs = (tree) ((void *)0); + tree width = (tree) ((void *)0); + tree d; + if (c_parser_next_token_is (parser, CPP_COLON)) + { + c_parser_consume_token (parser); + width = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + postfix_attrs = c_parser_attributes (parser); + d = grokfield (declarator, specs, width); + decl_attributes (&d, chainon (postfix_attrs, + all_prefix_attrs), 0); + ((d)->common.chain) = decls; + decls = d; + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + all_prefix_attrs = chainon (c_parser_attributes (parser), + prefix_attrs); + else + all_prefix_attrs = prefix_attrs; + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else if (c_parser_next_token_is (parser, CPP_SEMICOLON) + || c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + + break; + } + else + { + c_parser_error (parser, "expected %<,%>, %<;%> or %<}%>"); + break; + } + } + else + { + c_parser_error (parser, + "expected %<:%>, %<,%>, %<;%>, %<}%> or " + "%<__attribute__%>"); + break; + } + } + return decls; +} +# 2144 "../../GCC/gcc/c-parser.c" +static struct c_typespec +c_parser_typeof_specifier (c_parser *parser) +{ + struct c_typespec ret; + ret.kind = ctsk_typeof; + ret.spec = global_trees[TI_ERROR_MARK]; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_TYPEOF)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 2150, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + skip_evaluation++; + in_typeof++; + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + skip_evaluation--; + in_typeof--; + return ret; + } + if (c_parser_next_token_starts_typename (parser)) + { + struct c_type_name *type = c_parser_type_name (parser); + skip_evaluation--; + in_typeof--; + if (type != ((void *)0)) + { + ret.spec = groktypename (type); + pop_maybe_used (variably_modified_type_p (ret.spec, (tree) ((void *)0))); + } + } + else + { + unsigned char was_vm; + struct c_expr expr = c_parser_expression (parser); + skip_evaluation--; + in_typeof--; + if (((enum tree_code) (expr.value)->common.code) == COMPONENT_REF + && ((__extension__ ({ const tree __t = (__extension__ ({ const tree __t = (__extension__ (*({const tree __t = __extension__ ({ const tree __t = (expr.value); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 2178, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 2178, __FUNCTION__); &__t->exp.operands[__i]; }))); if (((enum tree_code) (__t)->common.code) != (FIELD_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 2178, __FUNCTION__, (FIELD_DECL), 0); __t; })); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_COMMON)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_COMMON), "../../GCC/gcc/c-parser.c", 2178, __FUNCTION__); __t; })->decl_common.lang_flag_4) == 1)) + error ("% applied to a bit-field"); + ret.spec = ((expr.value)->common.type); + was_vm = variably_modified_type_p (ret.spec, (tree) ((void *)0)); + + + + if (!skip_evaluation && was_vm) + { + tree e = expr.value; + + + + if ((tree_code_type[(int) (((enum tree_code) (e)->common.code))] == tcc_declaration) || (tree_code_type[(int) (((enum tree_code) (e)->common.code))] == tcc_constant)) + e = build1_stat (NOP_EXPR,global_trees[TI_VOID_TYPE],e ); + + if (((tree_code_type[(int) (((enum tree_code) (e)->common.code))]) >= tcc_reference && (tree_code_type[(int) (((enum tree_code) (e)->common.code))]) <= tcc_expression)) + annotate_with_locus (e, input_location); + + add_stmt (e); + } + pop_maybe_used (was_vm); + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + return ret; +} +# 2282 "../../GCC/gcc/c-parser.c" +static struct c_declarator * +c_parser_declarator (c_parser *parser, unsigned char type_seen_p, c_dtr_syn kind, + unsigned char *seen_id) +{ + + if (c_parser_next_token_is (parser, CPP_MULT)) + { + struct c_declspecs *quals_attrs = build_null_declspecs (); + struct c_declarator *inner; + c_parser_consume_token (parser); + c_parser_declspecs (parser, quals_attrs, 0, 0, 1); + inner = c_parser_declarator (parser, type_seen_p, kind, seen_id); + if (inner == ((void *)0)) + return ((void *)0); + else + return make_pointer_declarator (quals_attrs, inner); + } + + + return c_parser_direct_declarator (parser, type_seen_p, kind, seen_id); +} + + + + +static struct c_declarator * +c_parser_direct_declarator (c_parser *parser, unsigned char type_seen_p, c_dtr_syn kind, + unsigned char *seen_id) +{ +# 2345 "../../GCC/gcc/c-parser.c" + if (kind != C_DTR_ABSTRACT + && c_parser_next_token_is (parser, CPP_NAME) + && ((type_seen_p + && c_parser_peek_token (parser)->id_kind == C_ID_TYPENAME) + || c_parser_peek_token (parser)->id_kind == C_ID_ID)) + { + struct c_declarator *inner + = build_id_declarator (c_parser_peek_token (parser)->value); + *seen_id = 1; + inner->id_loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + return c_parser_direct_declarator_inner (parser, *seen_id, inner); + } + + if (kind != C_DTR_NORMAL + && c_parser_next_token_is (parser, CPP_OPEN_SQUARE)) + { + struct c_declarator *inner = build_id_declarator ((tree) ((void *)0)); + return c_parser_direct_declarator_inner (parser, *seen_id, inner); + } + + + + + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + tree attrs; + struct c_declarator *inner; + c_parser_consume_token (parser); + attrs = c_parser_attributes (parser); + if (kind != C_DTR_NORMAL + && (c_parser_next_token_starts_declspecs (parser) + || c_parser_next_token_is (parser, CPP_CLOSE_PAREN))) + { + struct c_arg_info *args + = c_parser_parms_declarator (parser, kind == C_DTR_NORMAL, + attrs); + if (args == ((void *)0)) + return ((void *)0); + else + { + inner + = build_function_declarator (args, + build_id_declarator ((tree) ((void *)0))); + return c_parser_direct_declarator_inner (parser, *seen_id, + inner); + } + } + + inner = c_parser_declarator (parser, type_seen_p, kind, seen_id); + if (inner != ((void *)0) && attrs != ((void *)0)) + inner = build_attrs_declarator (attrs, inner); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + c_parser_consume_token (parser); + if (inner == ((void *)0)) + return ((void *)0); + else + return c_parser_direct_declarator_inner (parser, *seen_id, inner); + } + else + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return ((void *)0); + } + } + else + { + if (kind == C_DTR_NORMAL) + { + c_parser_error (parser, "expected identifier or %<(%>"); + return ((void *)0); + } + else + return build_id_declarator ((tree) ((void *)0)); + } +} + + + + + + +static struct c_declarator * +c_parser_direct_declarator_inner (c_parser *parser, unsigned char id_present, + struct c_declarator *inner) +{ + + if (c_parser_next_token_is (parser, CPP_OPEN_SQUARE)) + { + struct c_declarator *declarator; + struct c_declspecs *quals_attrs = build_null_declspecs (); + unsigned char static_seen; + unsigned char star_seen; + tree dimen; + c_parser_consume_token (parser); + c_parser_declspecs (parser, quals_attrs, 0, 0, 1); + static_seen = c_parser_next_token_is_keyword (parser, RID_STATIC); + if (static_seen) + c_parser_consume_token (parser); + if (static_seen && !quals_attrs->declspecs_seen_p) + c_parser_declspecs (parser, quals_attrs, 0, 0, 1); + if (!quals_attrs->declspecs_seen_p) + quals_attrs = ((void *)0); + + + + if (static_seen) + { + star_seen = 0; + dimen = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + else + { + if (c_parser_next_token_is (parser, CPP_CLOSE_SQUARE)) + { + dimen = (tree) ((void *)0); + star_seen = 0; + } + else if (c_parser_next_token_is (parser, CPP_MULT)) + { + if (c_parser_peek_2nd_token (parser)->type == CPP_CLOSE_SQUARE) + { + dimen = (tree) ((void *)0); + star_seen = 1; + c_parser_consume_token (parser); + } + else + { + star_seen = 0; + dimen = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + } + else + { + star_seen = 0; + dimen = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + } + if (c_parser_next_token_is (parser, CPP_CLOSE_SQUARE)) + c_parser_consume_token (parser); + else + { + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + return ((void *)0); + } + declarator = build_array_declarator (dimen, quals_attrs, static_seen, + star_seen); + if (declarator == ((void *)0)) + return ((void *)0); + inner = set_array_declarator_inner (declarator, inner, !id_present); + return c_parser_direct_declarator_inner (parser, id_present, inner); + } + else if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + tree attrs; + struct c_arg_info *args; + c_parser_consume_token (parser); + attrs = c_parser_attributes (parser); + args = c_parser_parms_declarator (parser, id_present, attrs); + if (args == ((void *)0)) + return ((void *)0); + else + { + inner = build_function_declarator (args, inner); + return c_parser_direct_declarator_inner (parser, id_present, inner); + } + } + return inner; +} + + + + + + +static struct c_arg_info * +c_parser_parms_declarator (c_parser *parser, unsigned char id_list_ok, tree attrs) +{ + push_scope (); + declare_parm_level (); + + + if (id_list_ok + && !attrs + && c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_token (parser)->id_kind == C_ID_ID) + { + tree list = (tree) ((void *)0), *nextp = &list; + while (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_token (parser)->id_kind == C_ID_ID) + { + *nextp = build_tree_list_stat((tree) ((void *)0),c_parser_peek_token (parser)->value ); + + nextp = & ((*nextp)->common.chain); + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_COMMA)) + break; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + c_parser_error (parser, "expected identifier"); + break; + } + } + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + struct c_arg_info *ret = ((struct c_arg_info *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_arg_info))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->parms = 0; + ret->tags = 0; + ret->types = list; + ret->others = 0; + ret->pending_sizes = 0; + ret->had_vla_unspec = 0; + c_parser_consume_token (parser); + pop_scope (); + return ret; + } + else + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + pop_scope (); + return ((void *)0); + } + } + else + { + struct c_arg_info *ret = c_parser_parms_list_declarator (parser, attrs); + pop_scope (); + return ret; + } +} + + + + + +static struct c_arg_info * +c_parser_parms_list_declarator (c_parser *parser, tree attrs) +{ + unsigned char good_parm = 0; + + + + + + + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + struct c_arg_info *ret = ((struct c_arg_info *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_arg_info))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->parms = 0; + ret->tags = 0; + ret->types = 0; + ret->others = 0; + ret->pending_sizes = 0; + ret->had_vla_unspec = 0; + c_parser_consume_token (parser); + return ret; + } + if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) + { + struct c_arg_info *ret = ((struct c_arg_info *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_arg_info))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->parms = 0; + ret->tags = 0; + ret->others = 0; + ret->pending_sizes = 0; + ret->had_vla_unspec = 0; + + ret->types = global_trees[TI_ERROR_MARK]; + error ("ISO C requires a named argument before %<...%>"); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + c_parser_consume_token (parser); + return ret; + } + else + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return ((void *)0); + } + } + + + + while (1) + { + + struct c_parm *parm = c_parser_parameter_declaration (parser, attrs); + attrs = (tree) ((void *)0); + if (parm != ((void *)0)) + { + good_parm = 1; + push_parm_decl (parm); + } + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + tree new_attrs; + c_parser_consume_token (parser); + mark_forward_parm_decls (); + new_attrs = c_parser_attributes (parser); + return c_parser_parms_list_declarator (parser, new_attrs); + } + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + c_parser_consume_token (parser); + if (good_parm) + return get_parm_info (0); + else + { + struct c_arg_info *ret + = ((struct c_arg_info *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_arg_info))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->parms = 0; + ret->tags = 0; + ret->types = 0; + ret->others = 0; + ret->pending_sizes = 0; + ret->had_vla_unspec = 0; + return ret; + } + } + if (!c_parser_require (parser, CPP_COMMA, + "expected %<;%>, %<,%> or %<)%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return ((void *)0); + } + if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + c_parser_consume_token (parser); + if (good_parm) + return get_parm_info (1); + else + { + struct c_arg_info *ret + = ((struct c_arg_info *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_arg_info))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->parms = 0; + ret->tags = 0; + ret->types = 0; + ret->others = 0; + ret->pending_sizes = 0; + ret->had_vla_unspec = 0; + return ret; + } + } + else + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return ((void *)0); + } + } + } +} + + + + +static struct c_parm * +c_parser_parameter_declaration (c_parser *parser, tree attrs) +{ + struct c_declspecs *specs; + struct c_declarator *declarator; + tree prefix_attrs; + tree postfix_attrs = (tree) ((void *)0); + unsigned char dummy = 0; + if (!c_parser_next_token_starts_declspecs (parser)) + { + + + c_parser_error (parser, + "expected declaration specifiers or %<...%>"); + c_parser_skip_to_end_of_parameter (parser); + return ((void *)0); + } + specs = build_null_declspecs (); + if (attrs) + { + declspecs_add_attrs (specs, attrs); + attrs = (tree) ((void *)0); + } + c_parser_declspecs (parser, specs, 1, 1, 1); + finish_declspecs (specs); + pending_xref_error (); + prefix_attrs = specs->attrs; + specs->attrs = (tree) ((void *)0); + declarator = c_parser_declarator (parser, specs->type_seen_p, + C_DTR_PARM, &dummy); + if (declarator == ((void *)0)) + { + c_parser_skip_until_found (parser, CPP_COMMA, ((void *)0)); + return ((void *)0); + } + if (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + postfix_attrs = c_parser_attributes (parser); + return build_c_parm (specs, chainon (postfix_attrs, prefix_attrs), + declarator); +} +# 2762 "../../GCC/gcc/c-parser.c" +static tree +c_parser_asm_string_literal (c_parser *parser) +{ + tree str; + if (c_parser_next_token_is (parser, CPP_STRING)) + { + str = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else if (c_parser_next_token_is (parser, CPP_WSTRING)) + { + error ("wide string literal in %"); + str = build_string (1, ""); + c_parser_consume_token (parser); + } + else + { + c_parser_error (parser, "expected string literal"); + str = (tree) ((void *)0); + } + return str; +} +# 2793 "../../GCC/gcc/c-parser.c" +static tree +c_parser_simple_asm_expr (c_parser *parser) +{ + tree str; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_ASM)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 2797, __FUNCTION__), 0 : 0)); + + + c_lex_string_translate = 0; + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + c_lex_string_translate = 1; + return (tree) ((void *)0); + } + str = c_parser_asm_string_literal (parser); + c_lex_string_translate = 1; + if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + return str; +} +# 2844 "../../GCC/gcc/c-parser.c" +static tree +c_parser_attributes (c_parser *parser) +{ + tree attrs = (tree) ((void *)0); + while (c_parser_next_token_is_keyword (parser, RID_ATTRIBUTE)) + { + + + c_lex_string_translate = 0; + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + c_lex_string_translate = 1; + return attrs; + } + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return attrs; + } + + while (c_parser_next_token_is (parser, CPP_COMMA) + || c_parser_next_token_is (parser, CPP_NAME) + || c_parser_next_token_is (parser, ((enum cpp_ttype) (N_TTYPES + 1)))) + { + tree attr, attr_name, attr_args; + if (c_parser_next_token_is (parser, CPP_COMMA)) + { + c_parser_consume_token (parser); + continue; + } + if (c_parser_next_token_is (parser, ((enum cpp_ttype) (N_TTYPES + 1)))) + { + + + unsigned char ok; + switch (c_parser_peek_token (parser)->keyword) + { + case RID_STATIC: + case RID_UNSIGNED: + case RID_LONG: + case RID_CONST: + case RID_EXTERN: + case RID_REGISTER: + case RID_TYPEDEF: + case RID_SHORT: + case RID_INLINE: + case RID_VOLATILE: + case RID_SIGNED: + case RID_AUTO: + case RID_RESTRICT: + case RID_COMPLEX: + case RID_THREAD: + case RID_INT: + case RID_CHAR: + case RID_FLOAT: + case RID_DOUBLE: + case RID_VOID: + case RID_DFLOAT32: + case RID_DFLOAT64: + case RID_DFLOAT128: + case RID_BOOL: + ok = 1; + break; + default: + ok = 0; + break; + } + if (!ok) + break; + } + attr_name = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_OPEN_PAREN)) + { + attr = build_tree_list_stat(attr_name,(tree) ((void *)0) ); + attrs = chainon (attrs, attr); + continue; + } + c_parser_consume_token (parser); + + + + + if (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_token (parser)->id_kind == C_ID_ID + && ((c_parser_peek_2nd_token (parser)->type == CPP_COMMA) + || (c_parser_peek_2nd_token (parser)->type + == CPP_CLOSE_PAREN))) + { + tree arg1 = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + attr_args = build_tree_list_stat((tree) ((void *)0),arg1 ); + else + { + c_parser_consume_token (parser); + attr_args = tree_cons_stat ((tree) ((void *)0),arg1,c_parser_expr_list (parser, 0) ); + + } + } + else + { + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + attr_args = (tree) ((void *)0); + else + attr_args = c_parser_expr_list (parser, 0); + } + attr = build_tree_list_stat(attr_name,attr_args ); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + c_parser_consume_token (parser); + else + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return attrs; + } + attrs = chainon (attrs, attr); + } + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + c_parser_consume_token (parser); + else + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return attrs; + } + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + c_parser_consume_token (parser); + else + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + return attrs; + } + c_lex_string_translate = 1; + } + return attrs; +} + + + + + + + +static struct c_type_name * +c_parser_type_name (c_parser *parser) +{ + struct c_declspecs *specs = build_null_declspecs (); + struct c_declarator *declarator; + struct c_type_name *ret; + unsigned char dummy = 0; + c_parser_declspecs (parser, specs, 0, 1, 1); + if (!specs->declspecs_seen_p) + { + c_parser_error (parser, "expected specifier-qualifier-list"); + return ((void *)0); + } + pending_xref_error (); + finish_declspecs (specs); + declarator = c_parser_declarator (parser, specs->type_seen_p, + C_DTR_ABSTRACT, &dummy); + if (declarator == ((void *)0)) + return ((void *)0); + ret = ((struct c_type_name *) __extension__ ({ struct obstack *__h = ((&parser_obstack)); __extension__ ({ struct obstack *__o = (__h); int __len = ((sizeof (struct c_type_name))); if (__o->chunk_limit - __o->next_free < __len) _obstack_newchunk (__o, __len); ((__o)->next_free += (__len)); (void) 0; }); __extension__ ({ struct obstack *__o1 = (__h); void *value; value = (void *) __o1->object_base; if (__o1->next_free == value) __o1->maybe_empty_object = 1; __o1->next_free = (((((__o1->next_free) - (char *) 0)+__o1->alignment_mask) & ~ (__o1->alignment_mask)) + (char *) 0); if (__o1->next_free - (char *)__o1->chunk > __o1->chunk_limit - (char *)__o1->chunk) __o1->next_free = __o1->chunk_limit; __o1->object_base = __o1->next_free; value; }); })); + ret->specs = specs; + ret->declarator = declarator; + return ret; +} +# 3062 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_initializer (c_parser *parser) +{ + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + return c_parser_braced_init (parser, (tree) ((void *)0), 0); + else + { + struct c_expr ret; + ret = c_parser_expr_no_commas (parser, ((void *)0)); + if (((enum tree_code) (ret.value)->common.code) != STRING_CST + && ((enum tree_code) (ret.value)->common.code) != COMPOUND_LITERAL_EXPR) + ret = default_function_array_conversion (ret); + return ret; + } +} + + + + + + + +static struct c_expr +c_parser_braced_init (c_parser *parser, tree type, unsigned char nested_p) +{ + ((void)(!(c_parser_next_token_is (parser, CPP_OPEN_BRACE)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3087, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (nested_p) + push_init_level (0); + else + really_start_incremental_init (type); + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + if (pedantic) + pedwarn ("ISO C forbids empty initializer braces"); + } + else + { + + + while (1) + { + c_parser_initelt (parser); + if (parser->error) + break; + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + break; + } + } + if (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE)) + { + struct c_expr ret; + ret.value = global_trees[TI_ERROR_MARK]; + ret.original_code = ERROR_MARK; + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, "expected %<}%>"); + return ret; + } + c_parser_consume_token (parser); + return pop_init_level (0); +} + + + +static void +c_parser_initelt (c_parser *parser) +{ + + + + if (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_COLON) + { + + set_init_label (c_parser_peek_token (parser)->value); + if (pedantic) + pedwarn ("obsolete use of designated initializer with %<:%>"); + c_parser_consume_token (parser); + c_parser_consume_token (parser); + } + else + { + + + int des_seen = 0; + while (c_parser_next_token_is (parser, CPP_OPEN_SQUARE) + || c_parser_next_token_is (parser, CPP_DOT)) + { + int des_prev = des_seen; + if (des_seen < 2) + des_seen++; + if (c_parser_next_token_is (parser, CPP_DOT)) + { + des_seen = 2; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + set_init_label (c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + } + else + { + struct c_expr init; + init.value = global_trees[TI_ERROR_MARK]; + init.original_code = ERROR_MARK; + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_COMMA, ((void *)0)); + process_init_element (init); + return; + } + } + else + { + tree first, second; +# 3190 "../../GCC/gcc/c-parser.c" + if (des_prev == 1 && (c_language & clk_objc)) + { + des_seen = des_prev; + break; + } + if (des_prev == 0 && (c_language & clk_objc)) + { + + + + + + + + tree rec, args; + struct c_expr mexpr; + c_parser_consume_token (parser); + if (c_parser_peek_token (parser)->type == CPP_NAME + && ((c_parser_peek_token (parser)->id_kind + == C_ID_TYPENAME) + || (c_parser_peek_token (parser)->id_kind + == C_ID_CLASSNAME))) + { + + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + rec = objc_get_class_reference (id); + goto parse_message_args; + } + first = c_parser_expr_no_commas (parser, ((void *)0)).value; + if (c_parser_next_token_is (parser, CPP_ELLIPSIS) + || c_parser_next_token_is (parser, CPP_CLOSE_SQUARE)) + goto array_desig_after_first; + + + + rec = first; + while (c_parser_next_token_is (parser, CPP_COMMA)) + { + struct c_expr next; + c_parser_consume_token (parser); + next = c_parser_expr_no_commas (parser, ((void *)0)); + next = default_function_array_conversion (next); + rec = build_compound_expr (rec, next.value); + } + parse_message_args: + + args = c_parser_objc_message_args (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + mexpr.value + = objc_build_message_expr (build_tree_list_stat(rec,args )); + mexpr.original_code = ERROR_MARK; + + + + c_parser_initval (parser, &mexpr); + return; + } + c_parser_consume_token (parser); + first = c_parser_expr_no_commas (parser, ((void *)0)).value; + array_desig_after_first: + if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) + { + c_parser_consume_token (parser); + second = c_parser_expr_no_commas (parser, ((void *)0)).value; + } + else + second = (tree) ((void *)0); + if (c_parser_next_token_is (parser, CPP_CLOSE_SQUARE)) + { + c_parser_consume_token (parser); + set_init_index (first, second); + if (pedantic && second) + pedwarn ("ISO C forbids specifying range of " + "elements to initialize"); + } + else + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + } + } + if (des_seen >= 1) + { + if (c_parser_next_token_is (parser, CPP_EQ)) + { + if (pedantic && !flag_isoc99) + pedwarn ("ISO C90 forbids specifying subobject to initialize"); + c_parser_consume_token (parser); + } + else + { + if (des_seen == 1) + { + if (pedantic) + pedwarn ("obsolete use of designated initializer " + "without %<=%>"); + } + else + { + struct c_expr init; + init.value = global_trees[TI_ERROR_MARK]; + init.original_code = ERROR_MARK; + c_parser_error (parser, "expected %<=%>"); + c_parser_skip_until_found (parser, CPP_COMMA, ((void *)0)); + process_init_element (init); + return; + } + } + } + } + c_parser_initval (parser, ((void *)0)); +} + + + + + + + +static void +c_parser_initval (c_parser *parser, struct c_expr *after) +{ + struct c_expr init; + ((void)(!(!after || (c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3314, __FUNCTION__), 0 : 0)); + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE) && !after) + init = c_parser_braced_init (parser, (tree) ((void *)0), 1); + else + { + init = c_parser_expr_no_commas (parser, after); + if (init.value != (tree) ((void *)0) + && ((enum tree_code) (init.value)->common.code) != STRING_CST + && ((enum tree_code) (init.value)->common.code) != COMPOUND_LITERAL_EXPR) + init = default_function_array_conversion (init); + } + process_init_element (init); +} +# 3381 "../../GCC/gcc/c-parser.c" +static tree +c_parser_compound_statement (c_parser *parser) +{ + tree stmt; + if (!c_parser_require (parser, CPP_OPEN_BRACE, "expected %<{%>")) + return global_trees[TI_ERROR_MARK]; + stmt = c_begin_compound_stmt (1); + c_parser_compound_statement_nostart (parser); + return c_end_compound_stmt (stmt, 1); +} + + + + + +static void +c_parser_compound_statement_nostart (c_parser *parser) +{ + unsigned char last_stmt = 0; + unsigned char last_label = 0; + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + c_parser_consume_token (parser); + return; + } + if (c_parser_next_token_is_keyword (parser, RID_LABEL)) + { + + + while (c_parser_next_token_is_keyword (parser, RID_LABEL)) + { + c_parser_consume_token (parser); + + + while (1) + { + tree label; + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + break; + } + label + = declare_label (c_parser_peek_token (parser)->value); + ((label)->common.lang_flag_1) = 1; + add_stmt (build_stmt (DECL_EXPR, label)); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + } + + + + if (pedantic) + pedwarn ("ISO C forbids label declarations"); + } + + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + c_parser_error (parser, "expected declaration or statement"); + c_parser_consume_token (parser); + return; + } + while (c_parser_next_token_is_not (parser, CPP_CLOSE_BRACE)) + { + location_t loc = c_parser_peek_token (parser)->location; + if (c_parser_next_token_is_keyword (parser, RID_CASE) + || c_parser_next_token_is_keyword (parser, RID_DEFAULT) + || (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_COLON)) + { + last_label = 1; + last_stmt = 0; + c_parser_label (parser); + } + else if (!last_label + && c_parser_next_token_starts_declspecs (parser)) + { + last_label = 0; + c_parser_declaration_or_fndef (parser, 1, 1, 1, 1); + if (last_stmt + && ((pedantic && !flag_isoc99) + || warn_declaration_after_statement)) + pedwarn_c90 ("%HISO C90 forbids mixed declarations and code", + &loc); + last_stmt = 0; + } + else if (!last_label + && c_parser_next_token_is_keyword (parser, RID_EXTENSION)) + { + + + + + while (c_parser_peek_2nd_token (parser)->type == ((enum cpp_ttype) (N_TTYPES + 1)) + && (c_parser_peek_2nd_token (parser)->keyword + == RID_EXTENSION)) + c_parser_consume_token (parser); + if (c_token_starts_declspecs (c_parser_peek_2nd_token (parser))) + { + int ext; + ext = disable_extension_diagnostics (); + c_parser_consume_token (parser); + last_label = 0; + c_parser_declaration_or_fndef (parser, 1, 1, 1, 1); + + + restore_extension_diagnostics (ext); + if (last_stmt + && ((pedantic && !flag_isoc99) + || warn_declaration_after_statement)) + pedwarn_c90 ("%HISO C90 forbids mixed declarations and code", + &loc); + last_stmt = 0; + } + else + goto statement; + } + else if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + + + + + + if (c_parser_pragma (parser, pragma_compound)) + last_label = 0, last_stmt = 1; + } + else if (c_parser_next_token_is (parser, CPP_EOF)) + { + c_parser_error (parser, "expected declaration or statement"); + return; + } + else + { + statement: + last_label = 0; + last_stmt = 1; + c_parser_statement_after_labels (parser); + } + + parser->error = 0; + } + if (last_label) + error ("label at end of compound statement"); + c_parser_consume_token (parser); +} +# 3549 "../../GCC/gcc/c-parser.c" +static void +c_parser_label (c_parser *parser) +{ + location_t loc1 = c_parser_peek_token (parser)->location; + tree label = (tree) ((void *)0); + if (c_parser_next_token_is_keyword (parser, RID_CASE)) + { + tree exp1, exp2; + c_parser_consume_token (parser); + exp1 = c_parser_expr_no_commas (parser, ((void *)0)).value; + if (c_parser_next_token_is (parser, CPP_COLON)) + { + c_parser_consume_token (parser); + label = do_case (exp1, (tree) ((void *)0)); + } + else if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) + { + c_parser_consume_token (parser); + exp2 = c_parser_expr_no_commas (parser, ((void *)0)).value; + if (c_parser_require (parser, CPP_COLON, "expected %<:%>")) + label = do_case (exp1, exp2); + } + else + c_parser_error (parser, "expected %<:%> or %<...%>"); + } + else if (c_parser_next_token_is_keyword (parser, RID_DEFAULT)) + { + c_parser_consume_token (parser); + if (c_parser_require (parser, CPP_COLON, "expected %<:%>")) + label = do_case ((tree) ((void *)0), (tree) ((void *)0)); + } + else + { + tree name = c_parser_peek_token (parser)->value; + tree tlab; + location_t loc2; + tree attrs; + ((void)(!(c_parser_next_token_is (parser, CPP_NAME)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3586, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + ((void)(!(c_parser_next_token_is (parser, CPP_COLON)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3588, __FUNCTION__), 0 : 0)); + loc2 = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + attrs = c_parser_attributes (parser); + tlab = define_label (loc2, name); + if (tlab) + { + decl_attributes (&tlab, attrs, 0); + label = add_stmt (build_stmt (LABEL_EXPR, tlab)); + } + } + if (label) + annotate_with_locus (label, loc1); +} +# 3700 "../../GCC/gcc/c-parser.c" +static void +c_parser_statement (c_parser *parser) +{ + while (c_parser_next_token_is_keyword (parser, RID_CASE) + || c_parser_next_token_is_keyword (parser, RID_DEFAULT) + || (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_COLON)) + c_parser_label (parser); + c_parser_statement_after_labels (parser); +} + + + +static void +c_parser_statement_after_labels (c_parser *parser) +{ + location_t loc = c_parser_peek_token (parser)->location; + tree stmt = (tree) ((void *)0); + switch (c_parser_peek_token (parser)->type) + { + case CPP_OPEN_BRACE: + add_stmt (c_parser_compound_statement (parser)); + break; + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (c_parser_peek_token (parser)->keyword) + { + case RID_IF: + c_parser_if_statement (parser); + break; + case RID_SWITCH: + c_parser_switch_statement (parser); + break; + case RID_WHILE: + c_parser_while_statement (parser); + break; + case RID_DO: + c_parser_do_statement (parser); + break; + case RID_FOR: + c_parser_for_statement (parser); + break; + case RID_GOTO: + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if ( !c_parser_next_token_is (parser, CPP_OPEN_PAREN) ) + { + stmt = c_finish_goto_label (id); + } + else + { + struct c_expr expr; + tree exprlist; + + expr.value = build_external_ref (id, 1, loc); + expr.original_code = ERROR_MARK; + + c_parser_consume_token (parser); + + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + exprlist = (tree) ((void *)0); + else + exprlist = c_parser_expr_list (parser, 1); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + expr.value = build_function_call (expr.value, exprlist); + (__extension__ ({ const tree __t = (expr.value); if (((enum tree_code) (__t)->common.code) != (CALL_EXPR)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 3769, __FUNCTION__, (CALL_EXPR), 0); __t; })->common.lang_flag_5) = 1; + + expr.original_code = ERROR_MARK; + expr = default_function_array_conversion (expr); + stmt = c_finish_return (expr.value); + } +# 3807 "../../GCC/gcc/c-parser.c" + } + else if (c_parser_next_token_is (parser, CPP_MULT)) + { + c_parser_consume_token (parser); + stmt = c_finish_goto_ptr (c_parser_expression (parser).value); + } + + else if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + } + + else + c_parser_error (parser, "expected identifier or %<*%>"); + goto expect_semicolon; + case RID_CONTINUE: + c_parser_consume_token (parser); + stmt = c_finish_bc_stmt (&c_cont_label, 0); + goto expect_semicolon; + case RID_BREAK: + c_parser_consume_token (parser); + stmt = c_finish_bc_stmt (&c_break_label, 1); + goto expect_semicolon; + case RID_RETURN: + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + stmt = c_finish_return ((tree) ((void *)0)); + c_parser_consume_token (parser); + } + else + { + stmt = c_finish_return (c_parser_expression_conv (parser).value); + goto expect_semicolon; + } + break; + case RID_ASM: + stmt = c_parser_asm_statement (parser); + break; + case RID_AT_THROW: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3846, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + stmt = objc_build_throw_stmt ((tree) ((void *)0)); + c_parser_consume_token (parser); + } + else + { + stmt + = objc_build_throw_stmt (c_parser_expression (parser).value); + goto expect_semicolon; + } + break; + case RID_AT_TRY: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3861, __FUNCTION__), 0 : 0)); + c_parser_objc_try_catch_statement (parser); + break; + case RID_AT_SYNCHRONIZED: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3865, __FUNCTION__), 0 : 0)); + c_parser_objc_synchronized_statement (parser); + break; + default: + goto expr_stmt; + } + break; + case CPP_SEMICOLON: + c_parser_consume_token (parser); + break; + case CPP_CLOSE_PAREN: + case CPP_CLOSE_SQUARE: + + + + + c_parser_error (parser, "expected statement"); + c_parser_consume_token (parser); + break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_stmt); + break; + default: + expr_stmt: + stmt = c_finish_expr_stmt (c_parser_expression_conv (parser).value); + expect_semicolon: + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + break; + } +# 3904 "../../GCC/gcc/c-parser.c" + if (stmt && ((tree_code_type[(int) (((enum tree_code) (stmt)->common.code))]) >= tcc_reference && (tree_code_type[(int) (((enum tree_code) (stmt)->common.code))]) <= tcc_expression)) + annotate_with_locus (stmt, loc); +} + + + + + + +static tree +c_parser_paren_condition (c_parser *parser) +{ + location_t loc; + tree cond; + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + return global_trees[TI_ERROR_MARK]; + loc = c_parser_peek_token (parser)->location; + cond = c_objc_common_truthvalue_conversion + (c_parser_expression_conv (parser).value); + if (((tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) >= tcc_reference && (tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) <= tcc_expression)) + annotate_with_locus (cond, loc); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + return cond; +} + + + +static tree +c_parser_c99_block_statement (c_parser *parser) +{ + tree block = c_begin_compound_stmt (flag_isoc99); + c_parser_statement (parser); + return c_end_compound_stmt (block, flag_isoc99); +} + + + + + + + +static tree +c_parser_if_body (c_parser *parser, unsigned char *if_p) +{ + tree block = c_begin_compound_stmt (flag_isoc99); + while (c_parser_next_token_is_keyword (parser, RID_CASE) + || c_parser_next_token_is_keyword (parser, RID_DEFAULT) + || (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_COLON)) + c_parser_label (parser); + *if_p = c_parser_next_token_is_keyword (parser, RID_IF); + if (extra_warnings && c_parser_next_token_is (parser, CPP_SEMICOLON)) + add_stmt (build_empty_stmt ()); + c_parser_statement_after_labels (parser); + return c_end_compound_stmt (block, flag_isoc99); +} +# 3968 "../../GCC/gcc/c-parser.c" +static void +c_parser_if_statement (c_parser *parser) +{ + tree block; + location_t loc; + tree cond; + unsigned char first_if = 0, second_if = 0; + tree first_body, second_body; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_IF)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 3976, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + block = c_begin_compound_stmt (flag_isoc99); + loc = c_parser_peek_token (parser)->location; + cond = c_parser_paren_condition (parser); + first_body = c_parser_if_body (parser, &first_if); + if (c_parser_next_token_is_keyword (parser, RID_ELSE)) + { + c_parser_consume_token (parser); + second_body = c_parser_if_body (parser, &second_if); + } + else + second_body = (tree) ((void *)0); + c_finish_if_stmt (loc, cond, first_body, second_body, first_if); + add_stmt (c_end_compound_stmt (block, flag_isoc99)); +} + + + + + + + +static void +c_parser_switch_statement (c_parser *parser) +{ + tree block, expr, body, save_break; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_SWITCH)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4003, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + block = c_begin_compound_stmt (flag_isoc99); + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr = c_parser_expression (parser).value; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + else + expr = global_trees[TI_ERROR_MARK]; + c_start_case (expr); + save_break = c_break_label; + c_break_label = (tree) ((void *)0); + body = c_parser_c99_block_statement (parser); + c_finish_case (body); + if (c_break_label) + add_stmt (build1_stat (LABEL_EXPR,global_trees[TI_VOID_TYPE],c_break_label )); + c_break_label = save_break; + add_stmt (c_end_compound_stmt (block, flag_isoc99)); +} + + + + + + + +static void +c_parser_while_statement (c_parser *parser) +{ + tree block, cond, body, save_break, save_cont; + location_t loc; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_WHILE)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4035, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + block = c_begin_compound_stmt (flag_isoc99); + loc = c_parser_peek_token (parser)->location; + cond = c_parser_paren_condition (parser); + save_break = c_break_label; + c_break_label = (tree) ((void *)0); + save_cont = c_cont_label; + c_cont_label = (tree) ((void *)0); + body = c_parser_c99_block_statement (parser); + c_finish_loop (loc, cond, ((void *)0), body, c_break_label, c_cont_label, 1); + add_stmt (c_end_compound_stmt (block, flag_isoc99)); + c_break_label = save_break; + c_cont_label = save_cont; +} + + + + + + + +static void +c_parser_do_statement (c_parser *parser) +{ + tree block, cond, body, save_break, save_cont, new_break, new_cont; + location_t loc; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_DO)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4062, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + block = c_begin_compound_stmt (flag_isoc99); + loc = c_parser_peek_token (parser)->location; + save_break = c_break_label; + c_break_label = (tree) ((void *)0); + save_cont = c_cont_label; + c_cont_label = (tree) ((void *)0); + body = c_parser_c99_block_statement (parser); + c_parser_require_keyword (parser, RID_WHILE, "expected %"); + new_break = c_break_label; + c_break_label = save_break; + new_cont = c_cont_label; + c_cont_label = save_cont; + cond = c_parser_paren_condition (parser); + if (!c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) + c_parser_skip_to_end_of_block_or_statement (parser); + c_finish_loop (loc, cond, ((void *)0), body, new_break, new_cont, 0); + add_stmt (c_end_compound_stmt (block, flag_isoc99)); +} +# 4099 "../../GCC/gcc/c-parser.c" +static void +c_parser_for_statement (c_parser *parser) +{ + tree block, cond, incr, save_break, save_cont, body; + location_t loc; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_FOR)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4104, __FUNCTION__), 0 : 0)); + loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + block = c_begin_compound_stmt (flag_isoc99); + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + c_parser_consume_token (parser); + c_finish_expr_stmt ((tree) ((void *)0)); + } + else if (c_parser_next_token_starts_declspecs (parser)) + { + c_parser_declaration_or_fndef (parser, 1, 1, 1, 1); + check_for_loop_decls (); + } + else if (c_parser_next_token_is_keyword (parser, RID_EXTENSION)) + { + + + + + while (c_parser_peek_2nd_token (parser)->type == ((enum cpp_ttype) (N_TTYPES + 1)) + && (c_parser_peek_2nd_token (parser)->keyword + == RID_EXTENSION)) + c_parser_consume_token (parser); + if (c_token_starts_declspecs (c_parser_peek_2nd_token (parser))) + { + int ext; + ext = disable_extension_diagnostics (); + c_parser_consume_token (parser); + c_parser_declaration_or_fndef (parser, 1, 1, 1, 1); + restore_extension_diagnostics (ext); + check_for_loop_decls (); + } + else + goto init_expr; + } + else + { + init_expr: + c_finish_expr_stmt (c_parser_expression (parser).value); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + } + + loc = c_parser_peek_token (parser)->location; + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + c_parser_consume_token (parser); + cond = (tree) ((void *)0); + } + else + { + tree ocond = c_parser_expression_conv (parser).value; + cond = c_objc_common_truthvalue_conversion (ocond); + if (((tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) >= tcc_reference && (tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) <= tcc_expression)) + annotate_with_locus (cond, loc); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + } + + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + incr = c_process_expr_stmt ((tree) ((void *)0)); + else + incr = c_process_expr_stmt (c_parser_expression (parser).value); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + else + { + cond = global_trees[TI_ERROR_MARK]; + incr = global_trees[TI_ERROR_MARK]; + } + save_break = c_break_label; + c_break_label = (tree) ((void *)0); + save_cont = c_cont_label; + c_cont_label = (tree) ((void *)0); + body = c_parser_c99_block_statement (parser); + c_finish_loop (loc, cond, incr, body, c_break_label, c_cont_label, 1); + add_stmt (c_end_compound_stmt (block, flag_isoc99)); + c_break_label = save_break; + c_cont_label = save_cont; +} +# 4203 "../../GCC/gcc/c-parser.c" +static tree +c_parser_asm_statement (c_parser *parser) +{ + tree quals, str, outputs, inputs, clobbers, ret; + unsigned char simple; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_ASM)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4208, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (c_parser_next_token_is_keyword (parser, RID_VOLATILE)) + { + quals = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else if (c_parser_next_token_is_keyword (parser, RID_CONST) + || c_parser_next_token_is_keyword (parser, RID_RESTRICT)) + { + warning (0, "%E qualifier ignored on asm", + c_parser_peek_token (parser)->value); + quals = (tree) ((void *)0); + c_parser_consume_token (parser); + } + else + quals = (tree) ((void *)0); + + + c_lex_string_translate = 0; + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + c_lex_string_translate = 1; + return (tree) ((void *)0); + } + str = c_parser_asm_string_literal (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + simple = 1; + outputs = (tree) ((void *)0); + inputs = (tree) ((void *)0); + clobbers = (tree) ((void *)0); + goto done_asm; + } + if (!c_parser_require (parser, CPP_COLON, "expected %<:%> or %<)%>")) + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + simple = 0; + + if (c_parser_next_token_is (parser, CPP_COLON) + || c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + outputs = (tree) ((void *)0); + else + outputs = c_parser_asm_operands (parser, 0); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + inputs = (tree) ((void *)0); + clobbers = (tree) ((void *)0); + goto done_asm; + } + if (!c_parser_require (parser, CPP_COLON, "expected %<:%> or %<)%>")) + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + + if (c_parser_next_token_is (parser, CPP_COLON) + || c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + inputs = (tree) ((void *)0); + else + inputs = c_parser_asm_operands (parser, 1); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + { + clobbers = (tree) ((void *)0); + goto done_asm; + } + if (!c_parser_require (parser, CPP_COLON, "expected %<:%> or %<)%>")) + { + c_lex_string_translate = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + + clobbers = c_parser_asm_clobbers (parser); + done_asm: + c_lex_string_translate = 1; + if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + if (!c_parser_require (parser, CPP_SEMICOLON, "expected %<;%>")) + c_parser_skip_to_end_of_block_or_statement (parser); + ret = build_asm_stmt (quals, build_asm_expr (str, outputs, inputs, + clobbers, simple)); + return ret; +} +# 4313 "../../GCC/gcc/c-parser.c" +static tree +c_parser_asm_operands (c_parser *parser, unsigned char convert_p) +{ + tree list = (tree) ((void *)0); + while (1) + { + tree name, str; + struct c_expr expr; + if (c_parser_next_token_is (parser, CPP_OPEN_SQUARE)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + name = build_string ((__extension__ ({ const tree __t = (id); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 4328, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.len), + ((const char *) __extension__ ({ const tree __t = (id); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 4329, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.str)); + } + else + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, ((void *)0)); + return (tree) ((void *)0); + } + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + } + else + name = (tree) ((void *)0); + str = c_parser_asm_string_literal (parser); + if (str == (tree) ((void *)0)) + return (tree) ((void *)0); + c_lex_string_translate = 1; + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + c_lex_string_translate = 0; + return (tree) ((void *)0); + } + expr = c_parser_expression (parser); + if (convert_p) + expr = default_function_array_conversion (expr); + c_lex_string_translate = 0; + if (!c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return (tree) ((void *)0); + } + list = chainon (list, build_tree_list_stat(build_tree_list_stat(name,str ),expr.value )); + + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + return list; +} +# 4377 "../../GCC/gcc/c-parser.c" +static tree +c_parser_asm_clobbers (c_parser *parser) +{ + tree list = (tree) ((void *)0); + while (1) + { + tree str = c_parser_asm_string_literal (parser); + if (str) + list = tree_cons_stat ((tree) ((void *)0),str,list ); + else + return (tree) ((void *)0); + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + return list; +} +# 4412 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_expr_no_commas (c_parser *parser, struct c_expr *after) +{ + struct c_expr lhs, rhs, ret; + enum tree_code code; + ((void)(!(!after || (c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4417, __FUNCTION__), 0 : 0)); + lhs = c_parser_conditional_expression (parser, after); + switch (c_parser_peek_token (parser)->type) + { + case CPP_EQ: + code = NOP_EXPR; + break; + case CPP_MULT_EQ: + code = MULT_EXPR; + break; + case CPP_DIV_EQ: + code = TRUNC_DIV_EXPR; + break; + case CPP_MOD_EQ: + code = TRUNC_MOD_EXPR; + break; + case CPP_PLUS_EQ: + code = PLUS_EXPR; + break; + case CPP_MINUS_EQ: + code = MINUS_EXPR; + break; + case CPP_LSHIFT_EQ: + code = LSHIFT_EXPR; + break; + case CPP_RSHIFT_EQ: + code = RSHIFT_EXPR; + break; + case CPP_AND_EQ: + code = BIT_AND_EXPR; + break; + case CPP_XOR_EQ: + code = BIT_XOR_EXPR; + break; + case CPP_OR_EQ: + code = BIT_IOR_EXPR; + break; + default: + return lhs; + } + c_parser_consume_token (parser); + rhs = c_parser_expr_no_commas (parser, ((void *)0)); + rhs = default_function_array_conversion (rhs); + ret.value = build_modify_expr (lhs.value, code, rhs.value); + if (code == NOP_EXPR) + ret.original_code = MODIFY_EXPR; + else + { + ((ret.value)->common.nowarning_flag) = 1; + ret.original_code = ERROR_MARK; + } + return ret; +} +# 4485 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_conditional_expression (c_parser *parser, struct c_expr *after) +{ + struct c_expr cond, exp1, exp2, ret; + ((void)(!(!after || (c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4489, __FUNCTION__), 0 : 0)); + cond = c_parser_binary_expression (parser, after); + if (c_parser_next_token_is_not (parser, CPP_QUERY)) + return cond; + cond = default_function_array_conversion (cond); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COLON)) + { + if (pedantic) + pedwarn ("ISO C forbids omitting the middle term of a ?: expression"); + + exp1.value = save_expr (default_conversion (cond.value)); + cond.value = c_objc_common_truthvalue_conversion (exp1.value); + skip_evaluation += cond.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; + } + else + { + cond.value + = c_objc_common_truthvalue_conversion + (default_conversion (cond.value)); + skip_evaluation += cond.value == c_global_trees[CTI_TRUTHVALUE_FALSE]; + exp1 = c_parser_expression_conv (parser); + skip_evaluation += ((cond.value == c_global_trees[CTI_TRUTHVALUE_TRUE]) + - (cond.value == c_global_trees[CTI_TRUTHVALUE_FALSE])); + } + if (!c_parser_require (parser, CPP_COLON, "expected %<:%>")) + { + skip_evaluation -= cond.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; + ret.value = global_trees[TI_ERROR_MARK]; + ret.original_code = ERROR_MARK; + return ret; + } + exp2 = c_parser_conditional_expression (parser, ((void *)0)); + exp2 = default_function_array_conversion (exp2); + skip_evaluation -= cond.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; + ret.value = build_conditional_expr (cond.value, exp1.value, exp2.value); + ret.original_code = ERROR_MARK; + return ret; +} +# 4583 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_binary_expression (c_parser *parser, struct c_expr *after) +{ +# 4609 "../../GCC/gcc/c-parser.c" + enum prec { + PREC_NONE, + PREC_LOGOR, + PREC_LOGAND, + PREC_BITOR, + PREC_BITXOR, + PREC_BITAND, + PREC_EQ, + PREC_REL, + PREC_SHIFT, + PREC_ADD, + PREC_MULT, + NUM_PRECS + }; + struct { + + struct c_expr expr; + + + enum prec prec; + + enum tree_code op; + } stack[NUM_PRECS]; + int sp; +# 4655 "../../GCC/gcc/c-parser.c" + ((void)(!(!after || (c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4655, __FUNCTION__), 0 : 0)); + stack[0].expr = c_parser_cast_expression (parser, after); + stack[0].prec = PREC_NONE; + sp = 0; + while (1) + { + enum prec oprec; + enum tree_code ocode; + if (parser->error) + goto out; + switch (c_parser_peek_token (parser)->type) + { + case CPP_MULT: + oprec = PREC_MULT; + ocode = MULT_EXPR; + break; + case CPP_DIV: + oprec = PREC_MULT; + ocode = TRUNC_DIV_EXPR; + break; + case CPP_MOD: + oprec = PREC_MULT; + ocode = TRUNC_MOD_EXPR; + break; + case CPP_PLUS: + oprec = PREC_ADD; + ocode = PLUS_EXPR; + break; + case CPP_MINUS: + oprec = PREC_ADD; + ocode = MINUS_EXPR; + break; + case CPP_LSHIFT: + oprec = PREC_SHIFT; + ocode = LSHIFT_EXPR; + break; + case CPP_RSHIFT: + oprec = PREC_SHIFT; + ocode = RSHIFT_EXPR; + break; + case CPP_LESS: + oprec = PREC_REL; + ocode = LT_EXPR; + break; + case CPP_GREATER: + oprec = PREC_REL; + ocode = GT_EXPR; + break; + case CPP_LESS_EQ: + oprec = PREC_REL; + ocode = LE_EXPR; + break; + case CPP_GREATER_EQ: + oprec = PREC_REL; + ocode = GE_EXPR; + break; + case CPP_EQ_EQ: + oprec = PREC_EQ; + ocode = EQ_EXPR; + break; + case CPP_NOT_EQ: + oprec = PREC_EQ; + ocode = NE_EXPR; + break; + case CPP_AND: + oprec = PREC_BITAND; + ocode = BIT_AND_EXPR; + break; + case CPP_XOR: + oprec = PREC_BITXOR; + ocode = BIT_XOR_EXPR; + break; + case CPP_OR: + oprec = PREC_BITOR; + ocode = BIT_IOR_EXPR; + break; + case CPP_AND_AND: + oprec = PREC_LOGAND; + ocode = TRUTH_ANDIF_EXPR; + break; + case CPP_OR_OR: + oprec = PREC_LOGOR; + ocode = TRUTH_ORIF_EXPR; + break; + default: + + + goto out; + } + c_parser_consume_token (parser); + while (oprec <= stack[sp].prec) + do { switch (stack[sp].op) { case TRUTH_ANDIF_EXPR: skip_evaluation -= stack[sp - 1].expr.value == c_global_trees[CTI_TRUTHVALUE_FALSE]; break; case TRUTH_ORIF_EXPR: skip_evaluation -= stack[sp - 1].expr.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; break; default: break; } stack[sp - 1].expr = default_function_array_conversion (stack[sp - 1].expr); stack[sp].expr = default_function_array_conversion (stack[sp].expr); stack[sp - 1].expr = parser_build_binary_op (stack[sp].op, stack[sp - 1].expr, stack[sp].expr); sp--; } while (0); + switch (ocode) + { + case TRUTH_ANDIF_EXPR: + stack[sp].expr + = default_function_array_conversion (stack[sp].expr); + stack[sp].expr.value = c_objc_common_truthvalue_conversion + (default_conversion (stack[sp].expr.value)); + skip_evaluation += stack[sp].expr.value == c_global_trees[CTI_TRUTHVALUE_FALSE]; + break; + case TRUTH_ORIF_EXPR: + stack[sp].expr + = default_function_array_conversion (stack[sp].expr); + stack[sp].expr.value = c_objc_common_truthvalue_conversion + (default_conversion (stack[sp].expr.value)); + skip_evaluation += stack[sp].expr.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; + break; + default: + break; + } + sp++; + stack[sp].expr = c_parser_cast_expression (parser, ((void *)0)); + stack[sp].prec = oprec; + stack[sp].op = ocode; + } + out: + while (sp > 0) + do { switch (stack[sp].op) { case TRUTH_ANDIF_EXPR: skip_evaluation -= stack[sp - 1].expr.value == c_global_trees[CTI_TRUTHVALUE_FALSE]; break; case TRUTH_ORIF_EXPR: skip_evaluation -= stack[sp - 1].expr.value == c_global_trees[CTI_TRUTHVALUE_TRUE]; break; default: break; } stack[sp - 1].expr = default_function_array_conversion (stack[sp - 1].expr); stack[sp].expr = default_function_array_conversion (stack[sp].expr); stack[sp - 1].expr = parser_build_binary_op (stack[sp].op, stack[sp - 1].expr, stack[sp].expr); sp--; } while (0); + return stack[0].expr; + +} +# 4787 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_cast_expression (c_parser *parser, struct c_expr *after) +{ + ((void)(!(!after || (c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4790, __FUNCTION__), 0 : 0)); + if (after) + return c_parser_postfix_expression_after_primary (parser, *after); + + + + + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN) + && c_token_starts_typename (c_parser_peek_2nd_token (parser))) + { + struct c_type_name *type_name; + struct c_expr ret; + struct c_expr expr; + c_parser_consume_token (parser); + type_name = c_parser_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + if (type_name == ((void *)0)) + { + ret.value = global_trees[TI_ERROR_MARK]; + ret.original_code = ERROR_MARK; + return ret; + } + + + used_types_insert (type_name->specs->type); + + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + return c_parser_postfix_expression_after_paren_type (parser, + type_name); + expr = c_parser_cast_expression (parser, ((void *)0)); + expr = default_function_array_conversion (expr); + ret.value = c_cast_expr (type_name, expr.value); + ret.original_code = ERROR_MARK; + return ret; + } + else + return c_parser_unary_expression (parser); +} +# 4856 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_unary_expression (c_parser *parser) +{ + int ext; + struct c_expr ret, op; + switch (c_parser_peek_token (parser)->type) + { + case CPP_PLUS_PLUS: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (PREINCREMENT_EXPR, op); + case CPP_MINUS_MINUS: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (PREDECREMENT_EXPR, op); + case CPP_AND: + c_parser_consume_token (parser); + return parser_build_unary_op (ADDR_EXPR, + c_parser_cast_expression (parser, ((void *)0))); + case CPP_MULT: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + ret.value = build_indirect_ref (op.value, "unary *"); + ret.original_code = ERROR_MARK; + return ret; + case CPP_PLUS: + c_parser_consume_token (parser); + if (!(c_language & clk_objc) && !in_system_header) + warning (OPT_Wtraditional, + "traditional C rejects the unary plus operator"); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (CONVERT_EXPR, op); + case CPP_MINUS: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (NEGATE_EXPR, op); + case CPP_COMPL: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (BIT_NOT_EXPR, op); + case CPP_NOT: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (TRUTH_NOT_EXPR, op); + case CPP_AND_AND: + + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + ret.value = finish_label_address_expr + (c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + } + else + { + c_parser_error (parser, "expected identifier"); + ret.value = global_trees[TI_ERROR_MARK]; + } + ret.original_code = ERROR_MARK; + return ret; + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (c_parser_peek_token (parser)->keyword) + { + case RID_SIZEOF: + return c_parser_sizeof_expression (parser); + case RID_ALIGNOF: + return c_parser_alignof_expression (parser); + case RID_EXTENSION: + c_parser_consume_token (parser); + ext = disable_extension_diagnostics (); + ret = c_parser_cast_expression (parser, ((void *)0)); + restore_extension_diagnostics (ext); + return ret; + case RID_REALPART: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (REALPART_EXPR, op); + case RID_IMAGPART: + c_parser_consume_token (parser); + op = c_parser_cast_expression (parser, ((void *)0)); + op = default_function_array_conversion (op); + return parser_build_unary_op (IMAGPART_EXPR, op); + default: + return c_parser_postfix_expression (parser); + } + default: + return c_parser_postfix_expression (parser); + } +} + + + +static struct c_expr +c_parser_sizeof_expression (c_parser *parser) +{ + struct c_expr expr; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_SIZEOF)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 4960, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + skip_evaluation++; + in_sizeof++; + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN) + && c_token_starts_typename (c_parser_peek_2nd_token (parser))) + { + + + struct c_type_name *type_name; + c_parser_consume_token (parser); + type_name = c_parser_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + if (type_name == ((void *)0)) + { + struct c_expr ret; + skip_evaluation--; + in_sizeof--; + ret.value = global_trees[TI_ERROR_MARK]; + ret.original_code = ERROR_MARK; + return ret; + } + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + expr = c_parser_postfix_expression_after_paren_type (parser, + type_name); + goto sizeof_expr; + } + + skip_evaluation--; + in_sizeof--; + if (type_name->declarator->kind == cdk_array + && type_name->declarator->u.array.vla_unspec_p) + { + + error ("%<[*]%> not allowed in other than a declaration"); + } + return c_expr_sizeof_type (type_name); + } + else + { + expr = c_parser_unary_expression (parser); + sizeof_expr: + skip_evaluation--; + in_sizeof--; + if (((enum tree_code) (expr.value)->common.code) == COMPONENT_REF + && ((__extension__ ({ const tree __t = (__extension__ ({ const tree __t = (__extension__ (*({const tree __t = __extension__ ({ const tree __t = (expr.value); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 5006, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 5006, __FUNCTION__); &__t->exp.operands[__i]; }))); if (((enum tree_code) (__t)->common.code) != (FIELD_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 5006, __FUNCTION__, (FIELD_DECL), 0); __t; })); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_COMMON)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_COMMON), "../../GCC/gcc/c-parser.c", 5006, __FUNCTION__); __t; })->decl_common.lang_flag_4) == 1)) + error ("% applied to a bit-field"); + return c_expr_sizeof_expr (expr); + } +} + + + +static struct c_expr +c_parser_alignof_expression (c_parser *parser) +{ + struct c_expr expr; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_ALIGNOF)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5018, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + skip_evaluation++; + in_alignof++; + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN) + && c_token_starts_typename (c_parser_peek_2nd_token (parser))) + { + + + struct c_type_name *type_name; + struct c_expr ret; + c_parser_consume_token (parser); + type_name = c_parser_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + if (type_name == ((void *)0)) + { + struct c_expr ret; + skip_evaluation--; + in_alignof--; + ret.value = global_trees[TI_ERROR_MARK]; + ret.original_code = ERROR_MARK; + return ret; + } + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + expr = c_parser_postfix_expression_after_paren_type (parser, + type_name); + goto alignof_expr; + } + + skip_evaluation--; + in_alignof--; + ret.value = c_sizeof_or_alignof_type (groktypename (type_name), 0, 1); + ret.original_code = ERROR_MARK; + return ret; + } + else + { + struct c_expr ret; + expr = c_parser_unary_expression (parser); + alignof_expr: + skip_evaluation--; + in_alignof--; + ret.value = c_alignof_expr (expr.value); + ret.original_code = ERROR_MARK; + return ret; + } +} +# 5120 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_postfix_expression (c_parser *parser) +{ + struct c_expr expr, e1, e2, e3; + struct c_type_name *t1, *t2; + switch (c_parser_peek_token (parser)->type) + { + case CPP_NUMBER: + case CPP_CHAR: + case CPP_WCHAR: + expr.value = c_parser_peek_token (parser)->value; + expr.original_code = ERROR_MARK; + c_parser_consume_token (parser); + break; + case CPP_STRING: + case CPP_WSTRING: + expr.value = c_parser_peek_token (parser)->value; + expr.original_code = STRING_CST; + c_parser_consume_token (parser); + break; + case CPP_OBJC_STRING: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5141, __FUNCTION__), 0 : 0)); + expr.value + = objc_build_string_object (c_parser_peek_token (parser)->value); + expr.original_code = ERROR_MARK; + c_parser_consume_token (parser); + break; + case CPP_NAME: + if (c_parser_peek_token (parser)->id_kind != C_ID_ID) + { + c_parser_error (parser, "expected expression"); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + { + tree id = c_parser_peek_token (parser)->value; + location_t loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + expr.value = build_external_ref (id, + (c_parser_peek_token (parser)->type + == CPP_OPEN_PAREN), loc); + expr.original_code = ERROR_MARK; + } + break; + case CPP_OPEN_PAREN: + + + if (c_parser_peek_2nd_token (parser)->type == CPP_OPEN_BRACE) + { + + tree stmt; + c_parser_consume_token (parser); + c_parser_consume_token (parser); + if ((current_stmt_tree ()->x_cur_stmt_list) == ((void *)0)) + { + error ("braced-group within expression allowed " + "only inside a function"); + parser->error = 1; + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, ((void *)0)); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + stmt = c_begin_stmt_expr (); + c_parser_compound_statement_nostart (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + if (pedantic) + pedwarn ("ISO C forbids braced-groups within expressions"); + expr.value = c_finish_stmt_expr (stmt); + expr.original_code = ERROR_MARK; + } + else if (c_token_starts_typename (c_parser_peek_2nd_token (parser))) + { + + + + + struct c_type_name *type_name; + c_parser_consume_token (parser); + type_name = c_parser_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + if (type_name == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + } + else + expr = c_parser_postfix_expression_after_paren_type (parser, + type_name); + } + else + { + + c_parser_consume_token (parser); + expr = c_parser_expression (parser); + if (((enum tree_code) (expr.value)->common.code) == MODIFY_EXPR) + ((expr.value)->common.nowarning_flag) = 1; + expr.original_code = ERROR_MARK; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + } + break; + case ((enum cpp_ttype) (N_TTYPES + 1)): + switch (c_parser_peek_token (parser)->keyword) + { + case RID_FUNCTION_NAME: + case RID_PRETTY_FUNCTION_NAME: + case RID_C99_FUNCTION_NAME: + expr.value = fname_decl (c_parser_peek_token (parser)->keyword, + c_parser_peek_token (parser)->value); + expr.original_code = ERROR_MARK; + c_parser_consume_token (parser); + break; + case RID_VA_ARG: + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + e1 = c_parser_expr_no_commas (parser, ((void *)0)); + if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + t1 = c_parser_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + if (t1 == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + } + else + { + expr.value = build_va_arg (e1.value, groktypename (t1)); + expr.original_code = ERROR_MARK; + } + break; + case RID_OFFSETOF: + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + t1 = c_parser_type_name (parser); + if (t1 == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + { + tree type = groktypename (t1); + tree offsetof_ref; + if (type == global_trees[TI_ERROR_MARK]) + offsetof_ref = global_trees[TI_ERROR_MARK]; + else + offsetof_ref = build1_stat (INDIRECT_REF,type,global_trees[TI_NULL_POINTER] ); + + + + if (c_parser_next_token_is (parser, CPP_NAME)) + { + offsetof_ref = build_component_ref + (offsetof_ref, c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + while (c_parser_next_token_is (parser, CPP_DOT) + || c_parser_next_token_is (parser, + CPP_OPEN_SQUARE)) + { + if (c_parser_next_token_is (parser, CPP_DOT)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, + CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + break; + } + offsetof_ref = build_component_ref + (offsetof_ref, + c_parser_peek_token (parser)->value); + c_parser_consume_token (parser); + } + else + { + tree idx; + c_parser_consume_token (parser); + idx = c_parser_expression (parser).value; + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + offsetof_ref = build_array_ref (offsetof_ref, idx); + } + } + } + else + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + expr.value = fold_offsetof (offsetof_ref, (tree) ((void *)0)); + expr.original_code = ERROR_MARK; + } + break; + case RID_CHOOSE_EXPR: + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + e1 = c_parser_expr_no_commas (parser, ((void *)0)); + if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + e2 = c_parser_expr_no_commas (parser, ((void *)0)); + if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + e3 = c_parser_expr_no_commas (parser, ((void *)0)); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + { + tree c; + + c = fold (e1.value); + if (((enum tree_code) (c)->common.code) != INTEGER_CST) + error ("first argument to %<__builtin_choose_expr%> not" + " a constant"); + expr = integer_zerop (c) ? e3 : e2; + } + break; + case RID_TYPES_COMPATIBLE_P: + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + t1 = c_parser_type_name (parser); + if (t1 == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + if (!c_parser_require (parser, CPP_COMMA, "expected %<,%>")) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + t2 = c_parser_type_name (parser); + if (t2 == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + { + tree e1, e2; + + e1 = (__extension__ ({ const tree __t = (groktypename (t1)); if (tree_code_type[(int) (((enum tree_code) (__t)->common.code))] != (tcc_type)) tree_class_check_failed (__t, (tcc_type), "../../GCC/gcc/c-parser.c", 5412, __FUNCTION__); __t; })->type.main_variant); + e2 = (__extension__ ({ const tree __t = (groktypename (t2)); if (tree_code_type[(int) (((enum tree_code) (__t)->common.code))] != (tcc_type)) tree_class_check_failed (__t, (tcc_type), "../../GCC/gcc/c-parser.c", 5413, __FUNCTION__); __t; })->type.main_variant); + + expr.value = comptypes (e1, e2) + ? build_int_cst ((tree) ((void *)0), 1) + : build_int_cst ((tree) ((void *)0), 0); + expr.original_code = ERROR_MARK; + } + break; + case RID_AT_SELECTOR: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5422, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + { + tree sel = c_parser_objc_selector_arg (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + expr.value = objc_build_selector_expr (sel); + expr.original_code = ERROR_MARK; + } + break; + case RID_AT_PROTOCOL: + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5439, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + { + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + expr.value = objc_build_protocol_expr (id); + expr.original_code = ERROR_MARK; + } + break; + case RID_AT_ENCODE: + + ((void)(!((c_language & clk_objc)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5466, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + t1 = c_parser_type_name (parser); + if (t1 == ((void *)0)) + { + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + break; + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + { + tree type = groktypename (t1); + expr.value = objc_build_encode_expr (type); + expr.original_code = ERROR_MARK; + } + break; + default: + c_parser_error (parser, "expected expression"); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + break; + case CPP_OPEN_SQUARE: + if ((c_language & clk_objc)) + { + tree receiver, args; + c_parser_consume_token (parser); + receiver = c_parser_objc_receiver (parser); + args = c_parser_objc_message_args (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + expr.value = objc_build_message_expr (build_tree_list_stat(receiver,args )); + + expr.original_code = ERROR_MARK; + break; + } + + default: + c_parser_error (parser, "expected expression"); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + break; + } + return c_parser_postfix_expression_after_primary (parser, expr); +} +# 5529 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_postfix_expression_after_paren_type (c_parser *parser, + struct c_type_name *type_name) +{ + tree type; + struct c_expr init; + struct c_expr expr; + start_init ((tree) ((void *)0), ((void *)0), 0); + type = groktypename (type_name); + if (type != global_trees[TI_ERROR_MARK] && (__extension__ ({ const tree __t = (type); if (tree_code_type[(int) (((enum tree_code) (__t)->common.code))] != (tcc_type)) tree_class_check_failed (__t, (tcc_type), "../../GCC/gcc/c-parser.c", 5538, __FUNCTION__); __t; })->type.lang_flag_1)) + { + error ("compound literal has variable size"); + type = global_trees[TI_ERROR_MARK]; + } + init = c_parser_braced_init (parser, type, 0); + finish_init (); + maybe_warn_string_init (type, init); + + if (pedantic && !flag_isoc99) + pedwarn ("ISO C90 forbids compound literals"); + expr.value = build_compound_literal (type, init.value); + expr.original_code = ERROR_MARK; + return c_parser_postfix_expression_after_primary (parser, expr); +} + + + + +static struct c_expr +c_parser_postfix_expression_after_primary (c_parser *parser, + struct c_expr expr) +{ + tree ident, idx, exprlist; + while (1) + { + switch (c_parser_peek_token (parser)->type) + { + case CPP_OPEN_SQUARE: + + c_parser_consume_token (parser); + idx = c_parser_expression (parser).value; + c_parser_skip_until_found (parser, CPP_CLOSE_SQUARE, + "expected %<]%>"); + expr.value = build_array_ref (expr.value, idx); + expr.original_code = ERROR_MARK; + break; + case CPP_OPEN_PAREN: + + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) + exprlist = (tree) ((void *)0); + else + exprlist = c_parser_expr_list (parser, 1); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + expr.value = build_function_call (expr.value, exprlist); + expr.original_code = ERROR_MARK; + break; + case CPP_DOT: + + c_parser_consume_token (parser); + expr = default_function_array_conversion (expr); + if (c_parser_next_token_is (parser, CPP_NAME)) + ident = c_parser_peek_token (parser)->value; + else + { + c_parser_error (parser, "expected identifier"); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + return expr; + } + c_parser_consume_token (parser); + expr.value = build_component_ref (expr.value, ident); + expr.original_code = ERROR_MARK; + break; + case CPP_DEREF: + + c_parser_consume_token (parser); + expr = default_function_array_conversion (expr); + if (c_parser_next_token_is (parser, CPP_NAME)) + ident = c_parser_peek_token (parser)->value; + else + { + c_parser_error (parser, "expected identifier"); + expr.value = global_trees[TI_ERROR_MARK]; + expr.original_code = ERROR_MARK; + return expr; + } + c_parser_consume_token (parser); + expr.value = build_component_ref (build_indirect_ref (expr.value, + "->"), ident); + expr.original_code = ERROR_MARK; + break; + case CPP_PLUS_PLUS: + + c_parser_consume_token (parser); + expr = default_function_array_conversion (expr); + expr.value = build_unary_op (POSTINCREMENT_EXPR, expr.value, 0); + expr.original_code = ERROR_MARK; + break; + case CPP_MINUS_MINUS: + + c_parser_consume_token (parser); + expr = default_function_array_conversion (expr); + expr.value = build_unary_op (POSTDECREMENT_EXPR, expr.value, 0); + expr.original_code = ERROR_MARK; + break; + default: + return expr; + } + } +} +# 5649 "../../GCC/gcc/c-parser.c" +static struct c_expr +c_parser_expression (c_parser *parser) +{ + struct c_expr expr; + expr = c_parser_expr_no_commas (parser, ((void *)0)); + while (c_parser_next_token_is (parser, CPP_COMMA)) + { + struct c_expr next; + c_parser_consume_token (parser); + next = c_parser_expr_no_commas (parser, ((void *)0)); + next = default_function_array_conversion (next); + expr.value = build_compound_expr (expr.value, next.value); + expr.original_code = COMPOUND_EXPR; + } + return expr; +} + + + + +static struct c_expr +c_parser_expression_conv (c_parser *parser) +{ + struct c_expr expr; + expr = c_parser_expression (parser); + expr = default_function_array_conversion (expr); + return expr; +} +# 5686 "../../GCC/gcc/c-parser.c" +static tree +c_parser_expr_list (c_parser *parser, unsigned char convert_p) +{ + struct c_expr expr; + tree ret, cur; + expr = c_parser_expr_no_commas (parser, ((void *)0)); + if (convert_p) + expr = default_function_array_conversion (expr); + ret = cur = build_tree_list_stat((tree) ((void *)0),expr.value ); + while (c_parser_next_token_is (parser, CPP_COMMA)) + { + c_parser_consume_token (parser); + expr = c_parser_expr_no_commas (parser, ((void *)0)); + if (convert_p) + expr = default_function_array_conversion (expr); + cur = ((cur)->common.chain) = build_tree_list_stat((tree) ((void *)0),expr.value ); + } + return ret; +} +# 5729 "../../GCC/gcc/c-parser.c" +static void +c_parser_objc_class_definition (c_parser *parser) +{ + unsigned char iface_p; + tree id1; + tree superclass; + if (c_parser_next_token_is_keyword (parser, RID_AT_INTERFACE)) + iface_p = 1; + else if (c_parser_next_token_is_keyword (parser, RID_AT_IMPLEMENTATION)) + iface_p = 0; + else + (fancy_abort ("../../GCC/gcc/c-parser.c", 5740, __FUNCTION__)); + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + return; + } + id1 = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + tree id2; + tree proto = (tree) ((void *)0); + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + return; + } + id2 = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + if (!iface_p) + { + objc_start_category_implementation (id1, id2); + return; + } + if (c_parser_next_token_is (parser, CPP_LESS)) + proto = c_parser_objc_protocol_refs (parser); + objc_start_category_interface (id1, id2, proto); + c_parser_objc_methodprotolist (parser); + c_parser_require_keyword (parser, RID_AT_END, "expected %<@end%>"); + objc_finish_interface (); + return; + } + if (c_parser_next_token_is (parser, CPP_COLON)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + return; + } + superclass = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else + superclass = (tree) ((void *)0); + if (iface_p) + { + tree proto = (tree) ((void *)0); + if (c_parser_next_token_is (parser, CPP_LESS)) + proto = c_parser_objc_protocol_refs (parser); + objc_start_class_interface (id1, superclass, proto); + } + else + objc_start_class_implementation (id1, superclass); + if (c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + c_parser_objc_class_instance_variables (parser); + if (iface_p) + { + objc_continue_interface (); + c_parser_objc_methodprotolist (parser); + c_parser_require_keyword (parser, RID_AT_END, "expected %<@end%>"); + objc_finish_interface (); + } + else + { + objc_continue_implementation (); + return; + } +} +# 5836 "../../GCC/gcc/c-parser.c" +static void +c_parser_objc_class_instance_variables (c_parser *parser) +{ + ((void)(!(c_parser_next_token_is (parser, CPP_OPEN_BRACE)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5839, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + while (c_parser_next_token_is_not (parser, CPP_EOF)) + { + tree decls; + + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + if (pedantic) + pedwarn ("extra semicolon in struct or union specified"); + c_parser_consume_token (parser); + continue; + } + + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + { + c_parser_consume_token (parser); + break; + } + + if (c_parser_next_token_is_keyword (parser, RID_AT_PRIVATE)) + { + c_parser_consume_token (parser); + objc_set_visibility (2); + continue; + } + else if (c_parser_next_token_is_keyword (parser, RID_AT_PROTECTED)) + { + c_parser_consume_token (parser); + objc_set_visibility (0); + continue; + } + else if (c_parser_next_token_is_keyword (parser, RID_AT_PUBLIC)) + { + c_parser_consume_token (parser); + objc_set_visibility (1); + continue; + } + else if (c_parser_next_token_is (parser, CPP_PRAGMA)) + { + c_parser_pragma (parser, pragma_external); + continue; + } + + + decls = c_parser_struct_declaration (parser); + { + + + tree ivar = nreverse (decls); + for (; ivar; ivar = ((ivar)->common.chain)) + objc_add_instance_variable (copy_node_stat (ivar )); + } + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + } +} + + + + + + + +static void +c_parser_objc_class_declaration (c_parser *parser) +{ + tree list = (tree) ((void *)0); + ((void)(!(c_parser_next_token_is_keyword (parser, RID_AT_CLASS)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5906, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + + + while (1) + { + tree id; + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + break; + } + id = c_parser_peek_token (parser)->value; + list = chainon (list, build_tree_list_stat((tree) ((void *)0),id )); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + objc_declare_class (list); +} + + + + + + + +static void +c_parser_objc_alias_declaration (c_parser *parser) +{ + tree id1, id2; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_AT_ALIAS)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5940, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_SEMICOLON, ((void *)0)); + return; + } + id1 = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + c_parser_skip_until_found (parser, CPP_SEMICOLON, ((void *)0)); + return; + } + id2 = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + objc_declare_alias (id1, id2); +} +# 5973 "../../GCC/gcc/c-parser.c" +static void +c_parser_objc_protocol_definition (c_parser *parser) +{ + ((void)(!(c_parser_next_token_is_keyword (parser, RID_AT_PROTOCOL)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 5976, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + return; + } + if (c_parser_peek_2nd_token (parser)->type == CPP_COMMA + || c_parser_peek_2nd_token (parser)->type == CPP_SEMICOLON) + { + tree list = (tree) ((void *)0); + + + while (1) + { + tree id; + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + break; + } + id = c_parser_peek_token (parser)->value; + list = chainon (list, build_tree_list_stat((tree) ((void *)0),id )); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + objc_declare_protocols (list); + } + else + { + tree id = c_parser_peek_token (parser)->value; + tree proto = (tree) ((void *)0); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_LESS)) + proto = c_parser_objc_protocol_refs (parser); + objc_pq_context = 1; + objc_start_protocol (id, proto); + c_parser_objc_methodprotolist (parser); + c_parser_require_keyword (parser, RID_AT_END, "expected %<@end%>"); + objc_pq_context = 0; + objc_finish_interface (); + } +} +# 6031 "../../GCC/gcc/c-parser.c" +static enum tree_code +c_parser_objc_method_type (c_parser *parser) +{ + switch (c_parser_peek_token (parser)->type) + { + case CPP_PLUS: + c_parser_consume_token (parser); + return PLUS_EXPR; + case CPP_MINUS: + c_parser_consume_token (parser); + return MINUS_EXPR; + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 6043, __FUNCTION__)); + } +} + + + + + + + +static void +c_parser_objc_method_definition (c_parser *parser) +{ + enum tree_code type = c_parser_objc_method_type (parser); + tree decl; + objc_set_method_type (type); + objc_pq_context = 1; + decl = c_parser_objc_method_decl (parser); + if (c_parser_next_token_is (parser, CPP_SEMICOLON)) + { + c_parser_consume_token (parser); + if (pedantic) + pedwarn ("extra semicolon in method definition specified"); + } + if (!c_parser_next_token_is (parser, CPP_OPEN_BRACE)) + { + c_parser_error (parser, "expected %<{%>"); + return; + } + objc_pq_context = 0; + objc_start_method_definition (decl); + add_stmt (c_parser_compound_statement (parser)); + objc_finish_method_definition (current_function_decl); +} +# 6092 "../../GCC/gcc/c-parser.c" +static void +c_parser_objc_methodprotolist (c_parser *parser) +{ + while (1) + { + + switch (c_parser_peek_token (parser)->type) + { + case CPP_SEMICOLON: + if (pedantic) + pedwarn ("ISO C does not allow extra %<;%> outside of a function"); + c_parser_consume_token (parser); + break; + case CPP_PLUS: + case CPP_MINUS: + c_parser_objc_methodproto (parser); + break; + case CPP_PRAGMA: + c_parser_pragma (parser, pragma_external); + break; + case CPP_EOF: + return; + default: + if (c_parser_next_token_is_keyword (parser, RID_AT_END)) + return; + c_parser_declaration_or_fndef (parser, 0, 1, 0, 1); + break; + } + } +} + + + + + + + +static void +c_parser_objc_methodproto (c_parser *parser) +{ + enum tree_code type = c_parser_objc_method_type (parser); + tree decl; + objc_set_method_type (type); + + objc_pq_context = 1; + decl = c_parser_objc_method_decl (parser); + + objc_pq_context = 0; + objc_add_method_declaration (decl); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); +} +# 6174 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_method_decl (c_parser *parser) +{ + tree type = (tree) ((void *)0); + tree sel; + tree parms = (tree) ((void *)0); + unsigned char ellipsis = 0; + + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + c_parser_consume_token (parser); + type = c_parser_objc_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + sel = c_parser_objc_selector (parser); + + + + if (!sel || c_parser_next_token_is (parser, CPP_COLON)) + { + tree tsel = sel; + tree list = (tree) ((void *)0); + while (1) + { + tree atype = (tree) ((void *)0), id, keyworddecl; + if (!c_parser_require (parser, CPP_COLON, "expected %<:%>")) + break; + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + c_parser_consume_token (parser); + atype = c_parser_objc_type_name (parser); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<)%>"); + } + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + return global_trees[TI_ERROR_MARK]; + } + id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + keyworddecl = objc_build_keyword_decl (tsel, atype, id); + list = chainon (list, keyworddecl); + tsel = c_parser_objc_selector (parser); + if (!tsel && c_parser_next_token_is_not (parser, CPP_COLON)) + break; + } + + + + parms = make_node_stat (TREE_LIST ); + while (c_parser_next_token_is (parser, CPP_COMMA)) + { + struct c_parm *parm; + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) + { + ellipsis = 1; + c_parser_consume_token (parser); + break; + } + parm = c_parser_parameter_declaration (parser, (tree) ((void *)0)); + if (parm == ((void *)0)) + break; + parms = chainon (parms, + build_tree_list_stat((tree) ((void *)0),grokparm (parm) )); + } + sel = list; + } + return objc_build_method_signature (type, sel, parms, ellipsis); +} +# 6260 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_type_name (c_parser *parser) +{ + tree quals = (tree) ((void *)0); + struct c_type_name *typename = ((void *)0); + tree type = (tree) ((void *)0); + while (1) + { + c_token *token = c_parser_peek_token (parser); + if (token->type == ((enum cpp_ttype) (N_TTYPES + 1)) + && (token->keyword == RID_IN + || token->keyword == RID_OUT + || token->keyword == RID_INOUT + || token->keyword == RID_BYCOPY + || token->keyword == RID_BYREF + || token->keyword == RID_ONEWAY)) + { + quals = chainon (quals, build_tree_list_stat((tree) ((void *)0),token->value )); + c_parser_consume_token (parser); + } + else + break; + } + if (c_parser_next_token_starts_typename (parser)) + typename = c_parser_type_name (parser); + if (typename) + type = groktypename (typename); + return build_tree_list_stat(quals,type ); +} + + + + + + + +static tree +c_parser_objc_protocol_refs (c_parser *parser) +{ + tree list = (tree) ((void *)0); + ((void)(!(c_parser_next_token_is (parser, CPP_LESS)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 6300, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + + + while (1) + { + tree id; + if (c_parser_next_token_is_not (parser, CPP_NAME)) + { + c_parser_error (parser, "expected identifier"); + break; + } + id = c_parser_peek_token (parser)->value; + list = chainon (list, build_tree_list_stat((tree) ((void *)0),id )); + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COMMA)) + c_parser_consume_token (parser); + else + break; + } + c_parser_require (parser, CPP_GREATER, "expected %<>%>"); + return list; +} +# 6335 "../../GCC/gcc/c-parser.c" +static void +c_parser_objc_try_catch_statement (c_parser *parser) +{ + location_t loc; + tree stmt; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_AT_TRY)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 6340, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + loc = c_parser_peek_token (parser)->location; + stmt = c_parser_compound_statement (parser); + objc_begin_try_stmt (loc, stmt); + while (c_parser_next_token_is_keyword (parser, RID_AT_CATCH)) + { + struct c_parm *parm; + c_parser_consume_token (parser); + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + break; + parm = c_parser_parameter_declaration (parser, (tree) ((void *)0)); + if (parm == ((void *)0)) + { + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, ((void *)0)); + break; + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + objc_begin_catch_clause (grokparm (parm)); + if (c_parser_require (parser, CPP_OPEN_BRACE, "expected %<{%>")) + c_parser_compound_statement_nostart (parser); + objc_finish_catch_clause (); + } + if (c_parser_next_token_is_keyword (parser, RID_AT_FINALLY)) + { + location_t finloc; + tree finstmt; + c_parser_consume_token (parser); + finloc = c_parser_peek_token (parser)->location; + finstmt = c_parser_compound_statement (parser); + objc_build_finally_clause (finloc, finstmt); + } + objc_finish_try_stmt (); +} + + + + + + + +static void +c_parser_objc_synchronized_statement (c_parser *parser) +{ + location_t loc; + tree expr, stmt; + ((void)(!(c_parser_next_token_is_keyword (parser, RID_AT_SYNCHRONIZED)) ? fancy_abort ("../../GCC/gcc/c-parser.c", 6386, __FUNCTION__), 0 : 0)); + c_parser_consume_token (parser); + loc = c_parser_peek_token (parser)->location; + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + expr = c_parser_expression (parser).value; + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + else + expr = global_trees[TI_ERROR_MARK]; + stmt = c_parser_compound_statement (parser); + objc_build_synchronized (loc, expr, stmt); +} +# 6414 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_selector (c_parser *parser) +{ + c_token *token = c_parser_peek_token (parser); + tree value = token->value; + if (token->type == CPP_NAME) + { + c_parser_consume_token (parser); + return value; + } + if (token->type != ((enum cpp_ttype) (N_TTYPES + 1))) + return (tree) ((void *)0); + switch (token->keyword) + { + case RID_ENUM: + case RID_STRUCT: + case RID_UNION: + case RID_IF: + case RID_ELSE: + case RID_WHILE: + case RID_DO: + case RID_FOR: + case RID_SWITCH: + case RID_CASE: + case RID_DEFAULT: + case RID_BREAK: + case RID_CONTINUE: + case RID_RETURN: + case RID_GOTO: + case RID_ASM: + case RID_SIZEOF: + case RID_TYPEOF: + case RID_ALIGNOF: + case RID_UNSIGNED: + case RID_LONG: + case RID_CONST: + case RID_SHORT: + case RID_VOLATILE: + case RID_SIGNED: + case RID_RESTRICT: + case RID_COMPLEX: + case RID_IN: + case RID_OUT: + case RID_INOUT: + case RID_BYCOPY: + case RID_BYREF: + case RID_ONEWAY: + case RID_INT: + case RID_CHAR: + case RID_FLOAT: + case RID_DOUBLE: + case RID_VOID: + case RID_BOOL: + c_parser_consume_token (parser); + return value; + default: + return (tree) ((void *)0); + } +} +# 6489 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_selector_arg (c_parser *parser) +{ + tree sel = c_parser_objc_selector (parser); + tree list = (tree) ((void *)0); + if (sel && c_parser_next_token_is_not (parser, CPP_COLON)) + return sel; + while (1) + { + if (!c_parser_require (parser, CPP_COLON, "expected %<:%>")) + return list; + list = chainon (list, build_tree_list_stat(sel,(tree) ((void *)0) )); + sel = c_parser_objc_selector (parser); + if (!sel && c_parser_next_token_is_not (parser, CPP_COLON)) + break; + } + return list; +} +# 6516 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_receiver (c_parser *parser) +{ + if (c_parser_peek_token (parser)->type == CPP_NAME + && (c_parser_peek_token (parser)->id_kind == C_ID_TYPENAME + || c_parser_peek_token (parser)->id_kind == C_ID_CLASSNAME)) + { + tree id = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + return objc_get_class_reference (id); + } + return c_parser_expression (parser).value; +} +# 6545 "../../GCC/gcc/c-parser.c" +static tree +c_parser_objc_message_args (c_parser *parser) +{ + tree sel = c_parser_objc_selector (parser); + tree list = (tree) ((void *)0); + if (sel && c_parser_next_token_is_not (parser, CPP_COLON)) + return sel; + while (1) + { + tree keywordexpr; + if (!c_parser_require (parser, CPP_COLON, "expected %<:%>")) + return list; + keywordexpr = c_parser_objc_keywordexpr (parser); + list = chainon (list, build_tree_list_stat(sel,keywordexpr )); + sel = c_parser_objc_selector (parser); + if (!sel && c_parser_next_token_is_not (parser, CPP_COLON)) + break; + } + return list; +} + + + + + + + +static tree +c_parser_objc_keywordexpr (c_parser *parser) +{ + tree list = c_parser_expr_list (parser, 1); + if (((list)->common.chain) == (tree) ((void *)0)) + { + + + return (__extension__ ({ const tree __t = (list); if (((enum tree_code) (__t)->common.code) != (TREE_LIST)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6580, __FUNCTION__, (TREE_LIST), 0); __t; })->list.value); + } + else + { + + return list; + } +} + + + + + + + +static unsigned char +c_parser_pragma (c_parser *parser, enum pragma_context context) +{ + unsigned int id; + + id = c_parser_peek_token (parser)->pragma_kind; + ((void)(!(id != PRAGMA_NONE) ? fancy_abort ("../../GCC/gcc/c-parser.c", 6601, __FUNCTION__), 0 : 0)); + + switch (id) + { + case PRAGMA_OMP_BARRIER: + if (context != pragma_compound) + { + if (context == pragma_stmt) + c_parser_error (parser, "%<#pragma omp barrier%> may only be " + "used in compound statements"); + goto bad_stmt; + } + c_parser_omp_barrier (parser); + return 0; + + case PRAGMA_OMP_FLUSH: + if (context != pragma_compound) + { + if (context == pragma_stmt) + c_parser_error (parser, "%<#pragma omp flush%> may only be " + "used in compound statements"); + goto bad_stmt; + } + c_parser_omp_flush (parser); + return 0; + + case PRAGMA_OMP_THREADPRIVATE: + c_parser_omp_threadprivate (parser); + return 0; + + case PRAGMA_OMP_SECTION: + error ("%<#pragma omp section%> may only be used in " + "%<#pragma omp sections%> construct"); + c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, ((void *)0)); + return 0; + + case PRAGMA_GCC_PCH_PREPROCESS: + c_parser_error (parser, "%<#pragma GCC pch_preprocess%> must be first"); + c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, ((void *)0)); + return 0; + + default: + if (id < PRAGMA_FIRST_EXTERNAL) + { + if (context == pragma_external) + { + bad_stmt: + c_parser_error (parser, "expected declaration specifiers"); + c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, ((void *)0)); + return 0; + } + c_parser_omp_construct (parser); + return 1; + } + break; + } + + c_parser_consume_pragma (parser); + c_invoke_pragma_handler (id); + + + + + parser->error = 1; + c_parser_skip_to_pragma_eol (parser); + + return 0; +} + + + +enum cpp_ttype +pragma_lex (tree *value) +{ + c_token *tok = c_parser_peek_token (the_parser); + enum cpp_ttype ret = tok->type; + + *value = tok->value; + if (ret == CPP_PRAGMA_EOL || ret == CPP_EOF) + ret = CPP_EOF; + else + { + if (ret == ((enum cpp_ttype) (N_TTYPES + 1))) + ret = CPP_NAME; + c_parser_consume_token (the_parser); + } + + return ret; +} + +static void +c_parser_pragma_pch_preprocess (c_parser *parser) +{ + tree name = ((void *)0); + + c_parser_consume_pragma (parser); + if (c_parser_next_token_is (parser, CPP_STRING)) + { + name = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + } + else + c_parser_error (parser, "expected string literal"); + c_parser_skip_to_pragma_eol (parser); + + if (name) + c_common_pch_pragma (parse_in, ((const char *)(__extension__ ({ const tree __t = (name); if (((enum tree_code) (__t)->common.code) != (STRING_CST)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6707, __FUNCTION__, (STRING_CST), 0); __t; })->string.str))); +} +# 6717 "../../GCC/gcc/c-parser.c" +static pragma_omp_clause +c_parser_omp_clause_name (c_parser *parser) +{ + pragma_omp_clause result = PRAGMA_OMP_CLAUSE_NONE; + + if (c_parser_next_token_is_keyword (parser, RID_IF)) + result = PRAGMA_OMP_CLAUSE_IF; + else if (c_parser_next_token_is_keyword (parser, RID_DEFAULT)) + result = PRAGMA_OMP_CLAUSE_DEFAULT; + else if (c_parser_next_token_is (parser, CPP_NAME)) + { + const char *p = ((const char *) __extension__ ({ const tree __t = (c_parser_peek_token (parser)->value); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6728, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.str); + + switch (p[0]) + { + case 'c': + if (!strcmp ("copyin", p)) + result = PRAGMA_OMP_CLAUSE_COPYIN; + else if (!strcmp ("copyprivate", p)) + result = PRAGMA_OMP_CLAUSE_COPYPRIVATE; + break; + case 'f': + if (!strcmp ("firstprivate", p)) + result = PRAGMA_OMP_CLAUSE_FIRSTPRIVATE; + break; + case 'l': + if (!strcmp ("lastprivate", p)) + result = PRAGMA_OMP_CLAUSE_LASTPRIVATE; + break; + case 'n': + if (!strcmp ("nowait", p)) + result = PRAGMA_OMP_CLAUSE_NOWAIT; + else if (!strcmp ("num_threads", p)) + result = PRAGMA_OMP_CLAUSE_NUM_THREADS; + break; + case 'o': + if (!strcmp ("ordered", p)) + result = PRAGMA_OMP_CLAUSE_ORDERED; + break; + case 'p': + if (!strcmp ("private", p)) + result = PRAGMA_OMP_CLAUSE_PRIVATE; + break; + case 'r': + if (!strcmp ("reduction", p)) + result = PRAGMA_OMP_CLAUSE_REDUCTION; + break; + case 's': + if (!strcmp ("schedule", p)) + result = PRAGMA_OMP_CLAUSE_SCHEDULE; + else if (!strcmp ("shared", p)) + result = PRAGMA_OMP_CLAUSE_SHARED; + break; + } + } + + if (result != PRAGMA_OMP_CLAUSE_NONE) + c_parser_consume_token (parser); + + return result; +} + + + +static void +check_no_duplicate_clause (tree clauses, enum tree_code code, const char *name) +{ + tree c; + + for (c = clauses; c ; c = ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6786, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain)) + if ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6787, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->omp_clause.code == code) + { + error ("too many %qs clauses", name); + break; + } +} +# 6805 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_variable_list (c_parser *parser, enum omp_clause_code kind, + tree list) +{ + if (c_parser_next_token_is_not (parser, CPP_NAME) + || c_parser_peek_token (parser)->id_kind != C_ID_ID) + c_parser_error (parser, "expected identifier"); + + while (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_token (parser)->id_kind == C_ID_ID) + { + tree t = lookup_name (c_parser_peek_token (parser)->value); + + if (t == (tree) ((void *)0)) + undeclared_variable (c_parser_peek_token (parser)->value, + c_parser_peek_token (parser)->location); + else if (t == global_trees[TI_ERROR_MARK]) + ; + else if (kind != 0) + { + tree u = build_omp_clause (kind); + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (u); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6826, __FUNCTION__, (OMP_CLAUSE), 0); __t; })); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6826, __FUNCTION__, OMP_CLAUSE, 0); if ((int) __t->omp_clause.code < (int) (OMP_CLAUSE_PRIVATE) || (int) __t->omp_clause.code > (int) (OMP_CLAUSE_COPYPRIVATE)) omp_clause_range_check_failed (__t, "../../GCC/gcc/c-parser.c", 6826, __FUNCTION__, (OMP_CLAUSE_PRIVATE), (OMP_CLAUSE_COPYPRIVATE)); __t; }); const int __i = (0); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6826, __FUNCTION__, OMP_CLAUSE, 0); if (__i < 0 || __i >= omp_clause_num_ops [__t->omp_clause.code]) omp_clause_operand_check_failed (__i, __t, "../../GCC/gcc/c-parser.c", 6826, __FUNCTION__); &__t->omp_clause.ops[__i]; })) = t; + ((__extension__ ({ const tree __t = (u); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6827, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + list = u; + } + else + list = tree_cons_stat (t,(tree) ((void *)0),list ); + + c_parser_consume_token (parser); + + if (c_parser_next_token_is_not (parser, CPP_COMMA)) + break; + + c_parser_consume_token (parser); + } + + return list; +} + + + + +static tree +c_parser_omp_var_list_parens (c_parser *parser, enum tree_code kind, tree list) +{ + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + list = c_parser_omp_variable_list (parser, kind, list); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + return list; +} + + + + +static tree +c_parser_omp_clause_copyin (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_COPYIN, list); +} + + + + +static tree +c_parser_omp_clause_copyprivate (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_COPYPRIVATE, list); +} + + + + +static tree +c_parser_omp_clause_default (c_parser *parser, tree list) +{ + enum omp_clause_default_kind kind = OMP_CLAUSE_DEFAULT_UNSPECIFIED; + tree c; + + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + return list; + if (c_parser_next_token_is (parser, CPP_NAME)) + { + const char *p = ((const char *) __extension__ ({ const tree __t = (c_parser_peek_token (parser)->value); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6889, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.str); + + switch (p[0]) + { + case 'n': + if (strcmp ("none", p) != 0) + goto invalid_kind; + kind = OMP_CLAUSE_DEFAULT_NONE; + break; + + case 's': + if (strcmp ("shared", p) != 0) + goto invalid_kind; + kind = OMP_CLAUSE_DEFAULT_SHARED; + break; + + default: + goto invalid_kind; + } + + c_parser_consume_token (parser); + } + else + { + invalid_kind: + c_parser_error (parser, "expected % or %"); + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + + if (kind == OMP_CLAUSE_DEFAULT_UNSPECIFIED) + return list; + + check_no_duplicate_clause (list, OMP_CLAUSE_DEFAULT, "default"); + c = build_omp_clause (OMP_CLAUSE_DEFAULT); + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6923, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6924, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_DEFAULT)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 6924, __FUNCTION__, (OMP_CLAUSE_DEFAULT)); __t; })->omp_clause.subcode.default_kind) = kind; + + return c; +} + + + + +static tree +c_parser_omp_clause_firstprivate (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_FIRSTPRIVATE, list); +} + + + + +static tree +c_parser_omp_clause_if (c_parser *parser, tree list) +{ + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + tree t = c_parser_paren_condition (parser); + tree c; + + check_no_duplicate_clause (list, OMP_CLAUSE_IF, "if"); + + c = build_omp_clause (OMP_CLAUSE_IF); + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6952, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_IF)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 6952, __FUNCTION__, (OMP_CLAUSE_IF)); __t; }); const int __i = (0); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6952, __FUNCTION__, OMP_CLAUSE, 0); if (__i < 0 || __i >= omp_clause_num_ops [__t->omp_clause.code]) omp_clause_operand_check_failed (__i, __t, "../../GCC/gcc/c-parser.c", 6952, __FUNCTION__); &__t->omp_clause.ops[__i]; })) = t; + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6953, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + list = c; + } + else + c_parser_error (parser, "expected %<(%>"); + + return list; +} + + + + +static tree +c_parser_omp_clause_lastprivate (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_LASTPRIVATE, list); +} + + + + +static tree +c_parser_omp_clause_nowait (c_parser *parser __attribute__ ((__unused__)), tree list) +{ + tree c; + + check_no_duplicate_clause (list, OMP_CLAUSE_NOWAIT, "nowait"); + + c = build_omp_clause (OMP_CLAUSE_NOWAIT); + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 6982, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + return c; +} + + + + +static tree +c_parser_omp_clause_num_threads (c_parser *parser, tree list) +{ + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + tree c, t = c_parser_expression (parser).value; + + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + + if (!(((enum tree_code) (((t)->common.type))->common.code) == ENUMERAL_TYPE || ((enum tree_code) (((t)->common.type))->common.code) == BOOLEAN_TYPE || ((enum tree_code) (((t)->common.type))->common.code) == INTEGER_TYPE)) + { + c_parser_error (parser, "expected integer expression"); + return list; + } + + + c = fold_build2_stat (LE_EXPR, global_trees[TI_BOOLEAN_TYPE], t, build_int_cst (((t)->common.type), 0) ); + + if (c == global_trees[TI_BOOLEAN_TRUE]) + { + warning (0, "% value must be positive"); + t = global_trees[TI_INTEGER_ONE]; + } + + check_no_duplicate_clause (list, OMP_CLAUSE_NUM_THREADS, "num_threads"); + + c = build_omp_clause (OMP_CLAUSE_NUM_THREADS); + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7016, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_NUM_THREADS)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7016, __FUNCTION__, (OMP_CLAUSE_NUM_THREADS)); __t; }); const int __i = (0); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7016, __FUNCTION__, OMP_CLAUSE, 0); if (__i < 0 || __i >= omp_clause_num_ops [__t->omp_clause.code]) omp_clause_operand_check_failed (__i, __t, "../../GCC/gcc/c-parser.c", 7016, __FUNCTION__); &__t->omp_clause.ops[__i]; })) = t; + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7017, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + list = c; + } + + return list; +} + + + + +static tree +c_parser_omp_clause_ordered (c_parser *parser __attribute__ ((__unused__)), tree list) +{ + tree c; + + check_no_duplicate_clause (list, OMP_CLAUSE_ORDERED, "ordered"); + + c = build_omp_clause (OMP_CLAUSE_ORDERED); + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7035, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + return c; +} + + + + +static tree +c_parser_omp_clause_private (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_PRIVATE, list); +} + + + + + + + +static tree +c_parser_omp_clause_reduction (c_parser *parser, tree list) +{ + if (c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + { + enum tree_code code; + + switch (c_parser_peek_token (parser)->type) + { + case CPP_PLUS: + code = PLUS_EXPR; + break; + case CPP_MULT: + code = MULT_EXPR; + break; + case CPP_MINUS: + code = MINUS_EXPR; + break; + case CPP_AND: + code = BIT_AND_EXPR; + break; + case CPP_XOR: + code = BIT_XOR_EXPR; + break; + case CPP_OR: + code = BIT_IOR_EXPR; + break; + case CPP_AND_AND: + code = TRUTH_ANDIF_EXPR; + break; + case CPP_OR_OR: + code = TRUTH_ORIF_EXPR; + break; + default: + c_parser_error (parser, + "expected %<+%>, %<*%>, %<-%>, %<&%>, " + "%<^%>, %<|%>, %<&&%>, or %<||%>"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, 0); + return list; + } + c_parser_consume_token (parser); + if (c_parser_require (parser, CPP_COLON, "expected %<:%>")) + { + tree nl, c; + + nl = c_parser_omp_variable_list (parser, OMP_CLAUSE_REDUCTION, list); + for (c = nl; c != list; c = ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7100, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain)) + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7101, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_REDUCTION)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7101, __FUNCTION__, (OMP_CLAUSE_REDUCTION)); __t; })->omp_clause.subcode.reduction_code) = code; + + list = nl; + } + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + return list; +} +# 7118 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_clause_schedule (c_parser *parser, tree list) +{ + tree c, t; + + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + return list; + + c = build_omp_clause (OMP_CLAUSE_SCHEDULE); + + if (c_parser_next_token_is (parser, CPP_NAME)) + { + tree kind = c_parser_peek_token (parser)->value; + const char *p = ((const char *) __extension__ ({ const tree __t = (kind); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7131, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.str); + + switch (p[0]) + { + case 'd': + if (strcmp ("dynamic", p) != 0) + goto invalid_kind; + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7138, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7138, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; })->omp_clause.subcode.schedule_kind) = OMP_CLAUSE_SCHEDULE_DYNAMIC; + break; + + case 'g': + if (strcmp ("guided", p) != 0) + goto invalid_kind; + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7144, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7144, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; })->omp_clause.subcode.schedule_kind) = OMP_CLAUSE_SCHEDULE_GUIDED; + break; + + case 'r': + if (strcmp ("runtime", p) != 0) + goto invalid_kind; + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7150, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7150, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; })->omp_clause.subcode.schedule_kind) = OMP_CLAUSE_SCHEDULE_RUNTIME; + break; + + default: + goto invalid_kind; + } + } + else if (c_parser_next_token_is_keyword (parser, RID_STATIC)) + (__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7158, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7158, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; })->omp_clause.subcode.schedule_kind) = OMP_CLAUSE_SCHEDULE_STATIC; + else + goto invalid_kind; + + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_COMMA)) + { + c_parser_consume_token (parser); + + t = c_parser_expr_no_commas (parser, ((void *)0)).value; + + if ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7169, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7169, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; })->omp_clause.subcode.schedule_kind) == OMP_CLAUSE_SCHEDULE_RUNTIME) + error ("schedule % does not take " + "a % parameter"); + else if (((enum tree_code) (((t)->common.type))->common.code) == INTEGER_TYPE) + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7173, __FUNCTION__, OMP_CLAUSE, 0); if (__t->omp_clause.code != (OMP_CLAUSE_SCHEDULE)) omp_clause_check_failed (__t, "../../GCC/gcc/c-parser.c", 7173, __FUNCTION__, (OMP_CLAUSE_SCHEDULE)); __t; }); const int __i = (0); if (((enum tree_code) (__t)->common.code) != OMP_CLAUSE) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7173, __FUNCTION__, OMP_CLAUSE, 0); if (__i < 0 || __i >= omp_clause_num_ops [__t->omp_clause.code]) omp_clause_operand_check_failed (__i, __t, "../../GCC/gcc/c-parser.c", 7173, __FUNCTION__); &__t->omp_clause.ops[__i]; })) = t; + else + c_parser_error (parser, "expected integer expression"); + + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + else + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<,%> or %<)%>"); + + check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule"); + ((__extension__ ({ const tree __t = (c); if (((enum tree_code) (__t)->common.code) != (OMP_CLAUSE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7184, __FUNCTION__, (OMP_CLAUSE), 0); __t; }))->common.chain) = list; + return c; + + invalid_kind: + c_parser_error (parser, "invalid schedule kind"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, 0); + return list; +} + + + + +static tree +c_parser_omp_clause_shared (c_parser *parser, tree list) +{ + return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_SHARED, list); +} + + + + + +static tree +c_parser_omp_all_clauses (c_parser *parser, unsigned int mask, + const char *where) +{ + tree clauses = ((void *)0); + + while (c_parser_next_token_is_not (parser, CPP_PRAGMA_EOL)) + { + const pragma_omp_clause c_kind = c_parser_omp_clause_name (parser); + const char *c_name; + tree prev = clauses; + + switch (c_kind) + { + case PRAGMA_OMP_CLAUSE_COPYIN: + clauses = c_parser_omp_clause_copyin (parser, clauses); + c_name = "copyin"; + break; + case PRAGMA_OMP_CLAUSE_COPYPRIVATE: + clauses = c_parser_omp_clause_copyprivate (parser, clauses); + c_name = "copyprivate"; + break; + case PRAGMA_OMP_CLAUSE_DEFAULT: + clauses = c_parser_omp_clause_default (parser, clauses); + c_name = "default"; + break; + case PRAGMA_OMP_CLAUSE_FIRSTPRIVATE: + clauses = c_parser_omp_clause_firstprivate (parser, clauses); + c_name = "firstprivate"; + break; + case PRAGMA_OMP_CLAUSE_IF: + clauses = c_parser_omp_clause_if (parser, clauses); + c_name = "if"; + break; + case PRAGMA_OMP_CLAUSE_LASTPRIVATE: + clauses = c_parser_omp_clause_lastprivate (parser, clauses); + c_name = "lastprivate"; + break; + case PRAGMA_OMP_CLAUSE_NOWAIT: + clauses = c_parser_omp_clause_nowait (parser, clauses); + c_name = "nowait"; + break; + case PRAGMA_OMP_CLAUSE_NUM_THREADS: + clauses = c_parser_omp_clause_num_threads (parser, clauses); + c_name = "num_threads"; + break; + case PRAGMA_OMP_CLAUSE_ORDERED: + clauses = c_parser_omp_clause_ordered (parser, clauses); + c_name = "ordered"; + break; + case PRAGMA_OMP_CLAUSE_PRIVATE: + clauses = c_parser_omp_clause_private (parser, clauses); + c_name = "private"; + break; + case PRAGMA_OMP_CLAUSE_REDUCTION: + clauses = c_parser_omp_clause_reduction (parser, clauses); + c_name = "reduction"; + break; + case PRAGMA_OMP_CLAUSE_SCHEDULE: + clauses = c_parser_omp_clause_schedule (parser, clauses); + c_name = "schedule"; + break; + case PRAGMA_OMP_CLAUSE_SHARED: + clauses = c_parser_omp_clause_shared (parser, clauses); + c_name = "shared"; + break; + default: + c_parser_error (parser, "expected %<#pragma omp%> clause"); + goto saw_error; + } + + if (((mask >> c_kind) & 1) == 0 && !parser->error) + { + + + clauses = prev; + error ("%qs is not valid for %qs", c_name, where); + } + } + + saw_error: + c_parser_skip_to_pragma_eol (parser); + + return c_finish_omp_clauses (clauses); +} +# 7300 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_structured_block (c_parser *parser) +{ + tree stmt = push_stmt_list (); + c_parser_statement (parser); + return pop_stmt_list (stmt); +} +# 7319 "../../GCC/gcc/c-parser.c" +static void +c_parser_omp_atomic (c_parser *parser) +{ + tree lhs, rhs; + tree stmt; + enum tree_code code; + + c_parser_skip_to_pragma_eol (parser); + + lhs = c_parser_unary_expression (parser).value; + switch (((enum tree_code) (lhs)->common.code)) + { + case ERROR_MARK: + saw_error: + c_parser_skip_to_end_of_block_or_statement (parser); + return; + + case PREINCREMENT_EXPR: + case POSTINCREMENT_EXPR: + lhs = __extension__ (*({const tree __t = __extension__ ({ const tree __t = (lhs); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7338, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7338, __FUNCTION__); &__t->exp.operands[__i]; })); + code = PLUS_EXPR; + rhs = global_trees[TI_INTEGER_ONE]; + break; + + case PREDECREMENT_EXPR: + case POSTDECREMENT_EXPR: + lhs = __extension__ (*({const tree __t = __extension__ ({ const tree __t = (lhs); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7345, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7345, __FUNCTION__); &__t->exp.operands[__i]; })); + code = MINUS_EXPR; + rhs = global_trees[TI_INTEGER_ONE]; + break; + + default: + switch (c_parser_peek_token (parser)->type) + { + case CPP_MULT_EQ: + code = MULT_EXPR; + break; + case CPP_DIV_EQ: + code = TRUNC_DIV_EXPR; + break; + case CPP_PLUS_EQ: + code = PLUS_EXPR; + break; + case CPP_MINUS_EQ: + code = MINUS_EXPR; + break; + case CPP_LSHIFT_EQ: + code = LSHIFT_EXPR; + break; + case CPP_RSHIFT_EQ: + code = RSHIFT_EXPR; + break; + case CPP_AND_EQ: + code = BIT_AND_EXPR; + break; + case CPP_OR_EQ: + code = BIT_IOR_EXPR; + break; + case CPP_XOR_EQ: + code = BIT_XOR_EXPR; + break; + default: + c_parser_error (parser, + "invalid operator for %<#pragma omp atomic%>"); + goto saw_error; + } + + c_parser_consume_token (parser); + rhs = c_parser_expression (parser).value; + break; + } + stmt = c_finish_omp_atomic (code, lhs, rhs); + if (stmt != global_trees[TI_ERROR_MARK]) + add_stmt (stmt); + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); +} + + + + + + +static void +c_parser_omp_barrier (c_parser *parser) +{ + c_parser_consume_pragma (parser); + c_parser_skip_to_pragma_eol (parser); + + c_finish_omp_barrier (); +} + + + + + + +static tree +c_parser_omp_critical (c_parser *parser) +{ + tree stmt, name = ((void *)0); + + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + { + c_parser_consume_token (parser); + if (c_parser_next_token_is (parser, CPP_NAME)) + { + name = c_parser_peek_token (parser)->value; + c_parser_consume_token (parser); + c_parser_require (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + } + else + c_parser_error (parser, "expected identifier"); + } + else if (c_parser_next_token_is_not (parser, CPP_PRAGMA_EOL)) + c_parser_error (parser, "expected %<(%> or end of line"); + c_parser_skip_to_pragma_eol (parser); + + stmt = c_parser_omp_structured_block (parser); + return c_finish_omp_critical (stmt, name); +} + + + + + + + +static void +c_parser_omp_flush (c_parser *parser) +{ + c_parser_consume_pragma (parser); + if (c_parser_next_token_is (parser, CPP_OPEN_PAREN)) + c_parser_omp_var_list_parens (parser, 0, ((void *)0)); + else if (c_parser_next_token_is_not (parser, CPP_PRAGMA_EOL)) + c_parser_error (parser, "expected %<(%> or end of line"); + c_parser_skip_to_pragma_eol (parser); + + c_finish_omp_flush (); +} + + + + + +static tree +c_parser_omp_for_loop (c_parser *parser) +{ + tree decl, cond, incr, save_break, save_cont, body, init; + location_t loc; + + if (!c_parser_next_token_is_keyword (parser, RID_FOR)) + { + c_parser_error (parser, "for statement expected"); + return ((void *)0); + } + loc = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + + if (!c_parser_require (parser, CPP_OPEN_PAREN, "expected %<(%>")) + return ((void *)0); + + + if (c_parser_next_token_starts_declspecs (parser)) + { + c_parser_declaration_or_fndef (parser, 1, 1, 1, 1); + decl = check_for_loop_decls (); + if (decl == ((void *)0)) + goto error_init; + init = decl; + } + else if (c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_EQ) + { + decl = c_parser_postfix_expression (parser).value; + + c_parser_require (parser, CPP_EQ, "expected %<=%>"); + + init = c_parser_expr_no_commas (parser, ((void *)0)).value; + init = build_modify_expr (decl, NOP_EXPR, init); + init = c_process_expr_stmt (init); + + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + } + else + goto error_init; + + + cond = (tree) ((void *)0); + if (c_parser_next_token_is_not (parser, CPP_SEMICOLON)) + { + cond = c_parser_expression_conv (parser).value; + cond = c_objc_common_truthvalue_conversion (cond); + if (((tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) >= tcc_reference && (tree_code_type[(int) (((enum tree_code) (cond)->common.code))]) <= tcc_expression)) + annotate_with_locus (cond, input_location); + } + c_parser_skip_until_found (parser, CPP_SEMICOLON, "expected %<;%>"); + + + incr = (tree) ((void *)0); + if (c_parser_next_token_is_not (parser, CPP_CLOSE_PAREN)) + incr = c_process_expr_stmt (c_parser_expression (parser).value); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + + parse_body: + save_break = c_break_label; + c_break_label = global_trees[TI_SIZE_ONE]; + save_cont = c_cont_label; + c_cont_label = (tree) ((void *)0); + body = push_stmt_list (); + + add_stmt (c_parser_c99_block_statement (parser)); + if (c_cont_label) + add_stmt (build1_stat (LABEL_EXPR,global_trees[TI_VOID_TYPE],c_cont_label )); + + body = pop_stmt_list (body); + c_break_label = save_break; + c_cont_label = save_cont; + + + + if (decl != ((void *)0) && decl != global_trees[TI_ERROR_MARK] && init != global_trees[TI_ERROR_MARK]) + return c_finish_omp_for (loc, decl, init, cond, incr, body, ((void *)0)); + return ((void *)0); + + error_init: + c_parser_error (parser, "expected iteration declaration or initialization"); + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>"); + decl = init = cond = incr = (tree) ((void *)0); + goto parse_body; +} +# 7564 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_for (c_parser *parser) +{ + tree block, clauses, ret; + + clauses = c_parser_omp_all_clauses (parser, ( (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_LASTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_REDUCTION) | (1u << PRAGMA_OMP_CLAUSE_ORDERED) | (1u << PRAGMA_OMP_CLAUSE_SCHEDULE) | (1u << PRAGMA_OMP_CLAUSE_NOWAIT)), + "#pragma omp for"); + + block = c_begin_compound_stmt (1); + ret = c_parser_omp_for_loop (parser); + if (ret) + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (ret); if (((enum tree_code) (__t)->common.code) != (OMP_FOR)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7575, __FUNCTION__, (OMP_FOR), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7575, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7575, __FUNCTION__); &__t->exp.operands[__i]; })) = clauses; + block = c_end_compound_stmt (block, 1); + add_stmt (block); + + return ret; +} + + + + + + +static tree +c_parser_omp_master (c_parser *parser) +{ + c_parser_skip_to_pragma_eol (parser); + return c_finish_omp_master (c_parser_omp_structured_block (parser)); +} + + + + + + +static tree +c_parser_omp_ordered (c_parser *parser) +{ + c_parser_skip_to_pragma_eol (parser); + return c_finish_omp_ordered (c_parser_omp_structured_block (parser)); +} +# 7615 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_sections_scope (c_parser *parser) +{ + tree stmt, substmt; + unsigned char error_suppress = 0; + location_t loc; + + if (!c_parser_require (parser, CPP_OPEN_BRACE, "expected %<{%>")) + { + + parser->error = 0; + return (tree) ((void *)0); + } + + stmt = push_stmt_list (); + + loc = c_parser_peek_token (parser)->location; + if (c_parser_peek_token (parser)->pragma_kind != PRAGMA_OMP_SECTION) + { + substmt = push_stmt_list (); + + while (1) + { + c_parser_statement (parser); + + if (c_parser_peek_token (parser)->pragma_kind == PRAGMA_OMP_SECTION) + break; + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + break; + if (c_parser_next_token_is (parser, CPP_EOF)) + break; + } + + substmt = pop_stmt_list (substmt); + substmt = build1_stat (OMP_SECTION,global_trees[TI_VOID_TYPE],substmt ); + annotate_with_locus (substmt, loc); + add_stmt (substmt); + } + + while (1) + { + if (c_parser_next_token_is (parser, CPP_CLOSE_BRACE)) + break; + if (c_parser_next_token_is (parser, CPP_EOF)) + break; + + loc = c_parser_peek_token (parser)->location; + if (c_parser_peek_token (parser)->pragma_kind == PRAGMA_OMP_SECTION) + { + c_parser_consume_pragma (parser); + c_parser_skip_to_pragma_eol (parser); + error_suppress = 0; + } + else if (!error_suppress) + { + error ("expected %<#pragma omp section%> or %<}%>"); + error_suppress = 1; + } + + substmt = c_parser_omp_structured_block (parser); + substmt = build1_stat (OMP_SECTION,global_trees[TI_VOID_TYPE],substmt ); + annotate_with_locus (substmt, loc); + add_stmt (substmt); + } + c_parser_skip_until_found (parser, CPP_CLOSE_BRACE, + "expected %<#pragma omp section%> or %<}%>"); + + substmt = pop_stmt_list (stmt); + + stmt = make_node_stat (OMP_SECTIONS ); + ((stmt)->common.type) = global_trees[TI_VOID_TYPE]; + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_SECTIONS)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7686, __FUNCTION__, (OMP_SECTIONS), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7686, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7686, __FUNCTION__); &__t->exp.operands[__i]; })) = substmt; + + return add_stmt (stmt); +} +# 7703 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_sections (c_parser *parser) +{ + tree block, clauses, ret; + + clauses = c_parser_omp_all_clauses (parser, ( (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_LASTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_REDUCTION) | (1u << PRAGMA_OMP_CLAUSE_NOWAIT)), + "#pragma omp sections"); + + block = c_begin_compound_stmt (1); + ret = c_parser_omp_sections_scope (parser); + if (ret) + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (ret); if (((enum tree_code) (__t)->common.code) != (OMP_SECTIONS)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7714, __FUNCTION__, (OMP_SECTIONS), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7714, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7714, __FUNCTION__); &__t->exp.operands[__i]; })) = clauses; + block = c_end_compound_stmt (block, 1); + add_stmt (block); + + return ret; +} +# 7737 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_parallel (c_parser *parser) +{ + enum pragma_kind p_kind = PRAGMA_OMP_PARALLEL; + const char *p_name = "#pragma omp parallel"; + tree stmt, clauses, par_clause, ws_clause, block; + unsigned int mask = ( (1u << PRAGMA_OMP_CLAUSE_IF) | (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_DEFAULT) | (1u << PRAGMA_OMP_CLAUSE_SHARED) | (1u << PRAGMA_OMP_CLAUSE_COPYIN) | (1u << PRAGMA_OMP_CLAUSE_REDUCTION) | (1u << PRAGMA_OMP_CLAUSE_NUM_THREADS)); + + if (c_parser_next_token_is_keyword (parser, RID_FOR)) + { + c_parser_consume_token (parser); + p_kind = PRAGMA_OMP_PARALLEL_FOR; + p_name = "#pragma omp parallel for"; + mask |= ( (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_LASTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_REDUCTION) | (1u << PRAGMA_OMP_CLAUSE_ORDERED) | (1u << PRAGMA_OMP_CLAUSE_SCHEDULE) | (1u << PRAGMA_OMP_CLAUSE_NOWAIT)); + mask &= ~(1u << PRAGMA_OMP_CLAUSE_NOWAIT); + } + else if (c_parser_next_token_is (parser, CPP_NAME)) + { + const char *p = ((const char *) __extension__ ({ const tree __t = (c_parser_peek_token (parser)->value); if (((enum tree_code) (__t)->common.code) != (IDENTIFIER_NODE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7755, __FUNCTION__, (IDENTIFIER_NODE), 0); __t; })->identifier.id.str); + if (strcmp (p, "sections") == 0) + { + c_parser_consume_token (parser); + p_kind = PRAGMA_OMP_PARALLEL_SECTIONS; + p_name = "#pragma omp parallel sections"; + mask |= ( (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_LASTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_REDUCTION) | (1u << PRAGMA_OMP_CLAUSE_NOWAIT)); + mask &= ~(1u << PRAGMA_OMP_CLAUSE_NOWAIT); + } + } + + clauses = c_parser_omp_all_clauses (parser, mask, p_name); + + switch (p_kind) + { + case PRAGMA_OMP_PARALLEL: + block = c_begin_omp_parallel (); + c_parser_statement (parser); + stmt = c_finish_omp_parallel (clauses, block); + break; + + case PRAGMA_OMP_PARALLEL_FOR: + block = c_begin_omp_parallel (); + c_split_parallel_clauses (clauses, &par_clause, &ws_clause); + stmt = c_parser_omp_for_loop (parser); + if (stmt) + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_FOR)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7781, __FUNCTION__, (OMP_FOR), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7781, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7781, __FUNCTION__); &__t->exp.operands[__i]; })) = ws_clause; + stmt = c_finish_omp_parallel (par_clause, block); + ((__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_PARALLEL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7783, __FUNCTION__, (OMP_PARALLEL), 0); __t; }))->common.private_flag) = 1; + break; + + case PRAGMA_OMP_PARALLEL_SECTIONS: + block = c_begin_omp_parallel (); + c_split_parallel_clauses (clauses, &par_clause, &ws_clause); + stmt = c_parser_omp_sections_scope (parser); + if (stmt) + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_SECTIONS)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7791, __FUNCTION__, (OMP_SECTIONS), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7791, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7791, __FUNCTION__); &__t->exp.operands[__i]; })) = ws_clause; + stmt = c_finish_omp_parallel (par_clause, block); + ((__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_PARALLEL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7793, __FUNCTION__, (OMP_PARALLEL), 0); __t; }))->common.private_flag) = 1; + break; + + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 7797, __FUNCTION__)); + } + + return stmt; +} +# 7814 "../../GCC/gcc/c-parser.c" +static tree +c_parser_omp_single (c_parser *parser) +{ + tree stmt = make_node_stat (OMP_SINGLE ); + ((stmt)->common.type) = global_trees[TI_VOID_TYPE]; + + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_SINGLE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7820, __FUNCTION__, (OMP_SINGLE), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7820, __FUNCTION__); __t; }); const int __i = (1); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7820, __FUNCTION__); &__t->exp.operands[__i]; })) + = c_parser_omp_all_clauses (parser, ( (1u << PRAGMA_OMP_CLAUSE_PRIVATE) | (1u << PRAGMA_OMP_CLAUSE_FIRSTPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_COPYPRIVATE) | (1u << PRAGMA_OMP_CLAUSE_NOWAIT)), + "#pragma omp single"); + __extension__ (*({const tree __t = __extension__ ({ const tree __t = (__extension__ ({ const tree __t = (stmt); if (((enum tree_code) (__t)->common.code) != (OMP_SINGLE)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7823, __FUNCTION__, (OMP_SINGLE), 0); __t; })); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->common.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, "../../GCC/gcc/c-parser.c", 7823, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || __i >= tree_code_length[(int) (((enum tree_code) (__t)->common.code))]) tree_operand_check_failed (__i, ((enum tree_code) (__t)->common.code), "../../GCC/gcc/c-parser.c", 7823, __FUNCTION__); &__t->exp.operands[__i]; })) = c_parser_omp_structured_block (parser); + + return add_stmt (stmt); +} + + + + +static void +c_parser_omp_construct (c_parser *parser) +{ + enum pragma_kind p_kind; + location_t loc; + tree stmt; + + loc = c_parser_peek_token (parser)->location; + p_kind = c_parser_peek_token (parser)->pragma_kind; + c_parser_consume_pragma (parser); + + + + + if (p_kind != PRAGMA_OMP_ATOMIC) + c_maybe_initialize_eh (); + + switch (p_kind) + { + case PRAGMA_OMP_ATOMIC: + c_parser_omp_atomic (parser); + return; + case PRAGMA_OMP_CRITICAL: + stmt = c_parser_omp_critical (parser); + break; + case PRAGMA_OMP_FOR: + stmt = c_parser_omp_for (parser); + break; + case PRAGMA_OMP_MASTER: + stmt = c_parser_omp_master (parser); + break; + case PRAGMA_OMP_ORDERED: + stmt = c_parser_omp_ordered (parser); + break; + case PRAGMA_OMP_PARALLEL: + stmt = c_parser_omp_parallel (parser); + break; + case PRAGMA_OMP_SECTIONS: + stmt = c_parser_omp_sections (parser); + break; + case PRAGMA_OMP_SINGLE: + stmt = c_parser_omp_single (parser); + break; + default: + (fancy_abort ("../../GCC/gcc/c-parser.c", 7875, __FUNCTION__)); + } + + if (stmt) + annotate_with_locus (stmt, loc); +} + + + + + +static void +c_parser_omp_threadprivate (c_parser *parser) +{ + tree vars, t; + + c_parser_consume_pragma (parser); + vars = c_parser_omp_var_list_parens (parser, 0, ((void *)0)); + + if (!targetm.have_tls) + sorry ("threadprivate variables not supported in this target"); + + + for (t = vars; t; t = ((t)->common.chain)) + { + tree v = (__extension__ ({ const tree __t = (t); if (((enum tree_code) (__t)->common.code) != (TREE_LIST)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7900, __FUNCTION__, (TREE_LIST), 0); __t; })->list.purpose); + + + + if (((v)->common.used_flag) && !(__extension__ ({ const tree __t = (__extension__ ({ const tree __t = (v); if (((enum tree_code) (__t)->common.code) != (VAR_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7904, __FUNCTION__, (VAR_DECL), 0); __t; })); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_COMMON)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_COMMON), "../../GCC/gcc/c-parser.c", 7904, __FUNCTION__); __t; })->decl_common.lang_flag_3)) + error ("%qE declared % after first use", v); + else if (! ((v)->common.static_flag) && ! (__extension__ ({ const tree __t = (v); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_COMMON)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_COMMON), "../../GCC/gcc/c-parser.c", 7906, __FUNCTION__); __t; })->decl_common.decl_flag_2)) + error ("automatic variable %qE cannot be %", v); + else if (! ((__extension__ ({ const tree __t = (((v)->common.type)); if (tree_code_type[(int) (((enum tree_code) (__t)->common.code))] != (tcc_type)) tree_class_check_failed (__t, (tcc_type), "../../GCC/gcc/c-parser.c", 7908, __FUNCTION__); __t; })->type.size) != (tree) ((void *)0))) + error ("% %qE has incomplete type", v); + else + { + if (! (__extension__ ({ const tree __t = (v); if (((enum tree_code) (__t)->common.code) != (VAR_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7912, __FUNCTION__, (VAR_DECL), 0); __t; })->decl_with_vis.tls_model != TLS_MODEL_NONE)) + { + (__extension__ ({ const tree __t = (v); if (((enum tree_code) (__t)->common.code) != (VAR_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7914, __FUNCTION__, (VAR_DECL), 0); __t; })->decl_with_vis.tls_model) = decl_default_tls_model (v); + + + + if ((((tree_contains_struct[(((enum tree_code) (v)->common.code))][(TS_DECL_WRTL)])) && __extension__ ({ const tree __t = (v); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_WRTL)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_WRTL), "../../GCC/gcc/c-parser.c", 7918, __FUNCTION__); __t; })->decl_with_rtl.rtl != ((void *)0))) + make_decl_rtl (v); + } + (__extension__ ({ const tree __t = (__extension__ ({ const tree __t = (v); if (((enum tree_code) (__t)->common.code) != (VAR_DECL)) tree_check_failed (__t, "../../GCC/gcc/c-parser.c", 7921, __FUNCTION__, (VAR_DECL), 0); __t; })); if (tree_contains_struct[((enum tree_code) (__t)->common.code)][(TS_DECL_COMMON)] != 1) tree_contains_struct_check_failed (__t, (TS_DECL_COMMON), "../../GCC/gcc/c-parser.c", 7921, __FUNCTION__); __t; })->decl_common.lang_flag_3) = 1; + } + } + + c_parser_skip_to_pragma_eol (parser); +} + + + + +void +c_parse_file (void) +{ + + + + c_parser tparser; + + memset (&tparser, 0, sizeof tparser); + the_parser = &tparser; + + if (c_parser_peek_token (&tparser)->pragma_kind == PRAGMA_GCC_PCH_PREPROCESS) + c_parser_pragma_pch_preprocess (&tparser); + + the_parser = ((c_parser *) ggc_alloc_stat (sizeof (c_parser) )); + *the_parser = tparser; + + c_parser_translation_unit (the_parser); + the_parser = ((void *)0); +} + +# 1 "./gt-c-parser.h" 1 +# 22 "./gt-c-parser.h" +void +gt_ggc_mx_c_parser (void *x_p) +{ + struct c_parser * const x = (struct c_parser *)x_p; + if (((x) != ((void *)0) && ((void *) (x)) != (void *) 1 && ! ggc_set_mark (x))) + { + { + size_t i0; + for (i0 = 0; i0 != (size_t)(2); i0++) { + do { if ((*x).tokens[i0].value != ((void *)0)) gt_ggc_mx_lang_tree_node ((*x).tokens[i0].value); } while (0); + } + } + } +} + +void +gt_pch_nx_c_parser (void *x_p) +{ + struct c_parser * const x = (struct c_parser *)x_p; + if (gt_pch_note_object (x, x, gt_pch_p_8c_parser, gt_ggc_e_8c_parser)) + { + { + size_t i0; + for (i0 = 0; i0 != (size_t)(2); i0++) { + do { if ((*x).tokens[i0].value != ((void *)0)) gt_pch_nx_lang_tree_node ((*x).tokens[i0].value); } while (0); + gt_pch_n_S ((*x).tokens[i0].location.file); + } + } + } +} + +void +gt_pch_p_8c_parser (__attribute__ ((__unused__)) void *this_obj, + void *x_p, + __attribute__ ((__unused__)) gt_pointer_operator op, + __attribute__ ((__unused__)) void *cookie) +{ + struct c_parser * const x __attribute__ ((__unused__)) = (struct c_parser *)x_p; + { + size_t i0; + for (i0 = 0; i0 != (size_t)(2); i0++) { + if ((void *)(x) == this_obj) + op (&((*x).tokens[i0].value), cookie); + if ((void *)(x) == this_obj) + op (&((*x).tokens[i0].location.file), cookie); + } + } +} + + + +const struct ggc_root_tab gt_ggc_r_gt_c_parser_h[] = { + { + &the_parser, + 1, + sizeof (the_parser), + >_ggc_mx_c_parser, + >_pch_nx_c_parser + }, + { ((void *)0), 0, 0, ((void *)0), ((void *)0) } +}; +# 7952 "../../GCC/gcc/c-parser.c" 2 diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/code_segment_pointer_check/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/code_segment_pointer_check/Makefile Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,25 @@ + +CbCC=../../../build_cbc44/INSTALL_DIR/bin/gcc + +#CC=gcc +CC=../../../build_cbc44/INSTALL_DIR/bin/gcc + + +# fastcall版では-O0,-O2は動作確認、-O3以上はだめ +CFLAGS=-g -O2 -fomit-frame-pointer +#CFLAGS=-g -O0 + +.SUFFIXES: .cbc .o + +all: code_segment_pointer_check2 + +.cbc.o: + $(CbCC) $(CFLAGS) -c -o $@ $< + +code_segment_pointer_check2: code_segment_pointer_check2.o + $(CC) $(CFLAGS) -o $@ $^ + + +clean: + rm -rf *.o *.s code_segment_pointer_check2 + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/code_segment_pointer_check/code_segment_check.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/code_segment_pointer_check/code_segment_check.cbc Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,57 @@ +#include +#include +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(1), ## args) + +/* + * コードセグメント間の遷移をテスト + * + */ + +__code end (int a); +__code cs0a (int a, double b, int c, float d, char e); +__code cs1a (char e, int a, double b, int c, float d); +__code cs2a (float d, char e, int a, double b, int c); +__code cs3a (int c, float d, char e, int a, double b); +__code cs4a (double b, int c, float d, char e, int a); +int main (); + +__code end(int a) { + dprint("exit code is %d\n",a); + exit(a); +} + +int i=0; +__code cs0a(int a, double b, int c, float d, char e) { + if ( i++ >= 10 ) { + dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto end((int)(a*b*c*d*e)); + } + goto cs1a(e, a, b, c, d); +} +__code cs1a(char e, int a, double b, int c, float d) { + //dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto cs2a(d, e, a, b, c); +} +__code cs2a(float d, char e, int a, double b, int c) { + //dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto cs3a(c, d, e, a, b); +} +__code cs3a(int c, float d, char e, int a, double b) { + //dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto cs4a(b, c, d, e, a); +} +__code cs4a(double b, int c, float d, char e, int a) { + //dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto cs0a(a, b, c, d, e); +} + +__code starter(int a, double b, int c, float d, char e) { + dprint("exit code is expected to %d\n",(int)(a*b*c*d*e)); + dprint("int a=%d,double b=%2.3lf,int c=%d,float d=%2.3f,char e=%d\n", a, b, c, d, e); + goto cs0a(a,b,c,d,e); +} +int main() { + goto starter(11, 22.2, 33, 44.44, 55); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/code_segment_pointer_check/code_segment_pointer_check.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/code_segment_pointer_check/code_segment_pointer_check.cbc Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,120 @@ +#include +#include +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(0), ## args) + +/* + * コードセグメント間の遷移で + * + * + * + */ + +__code schedule (); +__code cs0a (); +__code cs1a (int a); +__code cs2a (int a, double b); +__code cs3a (int a, double b, int c); +__code cs4a (int a, double b, int c, float d); +__code cs0b (); +__code cs1b (int a); +__code cs2b (int a, double b); +__code cs3b (int a, double b, int c); +__code cs4b (int a, double b, int c, float d); + +/* defined in file code_segment_pointer_check.cbc at offset 1649 */ +int main (); + +__code end(int a) { + dprint("exit with code %d\n",a); + exit(a); +} + +__code (*cs0) (); +__code (*cs1) (int); +__code (*cs2) (int, double); +__code (*cs3) (int, double, int); +__code (*cs4) (int, double, int, float); +int i=0; +__code schedule() { + dprint("i=%d\n",i); + if ( i>=100 ) { + goto end(0); + } + switch (i++%5) { + case 0: + goto cs0(); + case 1: + goto cs1(i); + case 2: + goto cs2(i, i*1.3); + case 3: + goto cs3(i, i*1.3, 20*i); + case 4: + goto cs4(i, i*1.3, 20*i, i*0.8); + default: + exit(0); + } + dprint("code unreachable!\n"); +} + +__code cs0a() { + dprint("no args\n"); + cs0 = cs0b; + goto schedule(); +} +__code cs1a(int a) { + dprint("int a=%d\n", a); + cs1 = cs1b; + goto schedule(); +} +__code cs2a(int a, double b) { + dprint("int a=%d, double b=%lf\n", a, b); + cs2 = cs2b; + goto schedule(); +} +__code cs3a(int a, double b, int c) { + dprint("int a=%d, double b=%lf, int c=%d\n", a, b, c); + cs3 = cs3b; + goto schedule(); +} +__code cs4a(int a, double b, int c, float d) { + dprint("int a=%d, double b=%lf, int c=%d, float d=%f\n", a, b, c, d); + cs4 = cs4b; + goto schedule(); +} + +__code cs0b() { + dprint("no args\n"); + cs0 = cs0a; + goto schedule(); +} +__code cs1b(int a) { + dprint("int a=%d\n", a); + cs1 = cs1a; + goto schedule(); +} +__code cs2b(int a, double b) { + dprint("int a=%d, double b=%lf\n", a, b); + cs2 = cs2a; + goto schedule(); +} +__code cs3b(int a, double b, int c) { + dprint("int a=%d, double b=%lf, int c=%d\n", a, b, c); + cs3 = cs3a; + goto schedule(); +} +__code cs4b(int a, double b, int c, float d) { + dprint("int a=%d, double b=%lf, int c=%d, float d=%f\n", a, b, c, d); + cs4 = cs4a; + goto schedule(); +} + +int main() { + cs0 = cs0a; + cs1 = cs1a; + cs2 = cs2a; + cs3 = cs3a; + cs4 = cs4a; + goto schedule(); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/code_segment_pointer_check/code_segment_pointer_check2.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/code_segment_pointer_check/code_segment_pointer_check2.cbc Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,655 @@ +#include +#include +#include"code_segment_pointer_check2.h" +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(0), ## args) + +/* + * コードセグメント間の遷移をチェック + * + */ + +typedef __code (*CODEP)(int,int,int,int,int,int); +extern CODEP csps[]; +CODEP csps[] = { + //cs0,cs1 + cs0,cs1,cs2,cs3,cs4,cs5,cs6,cs7,cs8,cs9, + cs10,cs11,cs12,cs13,cs14,cs15,cs16,cs17,cs18,cs19, + cs20,cs21,cs22,cs23,cs24,cs25,cs26,cs27,cs28,cs29, + cs30,cs31,cs32,cs33,cs34,cs35,cs36,cs37,cs38,cs39, + cs40,cs41,cs42,cs43,cs44,cs45,cs46,cs47,cs48,cs49, + cs50,cs51,cs52,cs53,cs54,cs55,cs56,cs57,cs58,cs59, + cs60,cs61,cs62,cs63,cs64,cs65,cs66,cs67,cs68,cs69, + cs70,cs71,cs72,cs73,cs74,cs75,cs76,cs77,cs78,cs79, + cs80,cs81,cs82,cs83,cs84,cs85,cs86,cs87,cs88,cs89, + cs90,cs91,cs92,cs93,cs94,cs95,cs96,cs97,cs98,cs99, + cs100,cs101,cs102,cs103,cs104,cs105,cs106,cs107,cs108,cs109, + cs110,cs111,cs112,cs113,cs114,cs115,cs116,cs117,cs118,cs119 +}; + +__code end(int a, int b, int c, int d, int e) { + dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + exit(a); +} + +__code schedule(int i, int a, int b, int c, int d, int e) { + //CODEP p; + //p = csps[i%120]; + + if ( i>=1000 ) { + goto end(a, b, c, d, e); + } + + dprint("i=%d\n", i); + goto csps[i%120](i+1, a, b, c, d, e); + + dprint("code unreachable!\n"); +} + +int main() { + goto schedule(0, 11,22,33,44,55); +} + + + +/* created by script make_permutations.py. */ + +__code cs0(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,c,d,e); +} + +__code cs1(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,c,d,e); +} + +__code cs2(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,a,d,e); +} + +__code cs3(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,d,a,e); +} + +__code cs4(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,d,e,a); +} + +__code cs5(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,b,d,e); +} + +__code cs6(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,b,d,e); +} + +__code cs7(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,a,d,e); +} + +__code cs8(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,d,a,e); +} + +__code cs9(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,d,e,a); +} + +__code cs10(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,d,b,e); +} + +__code cs11(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,d,b,e); +} + +__code cs12(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,a,b,e); +} + +__code cs13(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,b,a,e); +} + +__code cs14(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,b,e,a); +} + +__code cs15(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,d,e,b); +} + +__code cs16(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,d,e,b); +} + +__code cs17(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,a,e,b); +} + +__code cs18(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,e,a,b); +} + +__code cs19(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,d,e,b,a); +} + +__code cs20(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,d,c,e); +} + +__code cs21(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,d,c,e); +} + +__code cs22(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,a,c,e); +} + +__code cs23(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,c,a,e); +} + +__code cs24(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,c,e,a); +} + +__code cs25(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,b,c,e); +} + +__code cs26(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,b,c,e); +} + +__code cs27(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,a,c,e); +} + +__code cs28(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,c,a,e); +} + +__code cs29(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,c,e,a); +} + +__code cs30(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,c,b,e); +} + +__code cs31(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,c,b,e); +} + +__code cs32(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,a,b,e); +} + +__code cs33(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,b,a,e); +} + +__code cs34(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,b,e,a); +} + +__code cs35(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,c,e,b); +} + +__code cs36(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,c,e,b); +} + +__code cs37(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,a,e,b); +} + +__code cs38(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,e,a,b); +} + +__code cs39(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,c,e,b,a); +} + +__code cs40(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,d,e,c); +} + +__code cs41(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,d,e,c); +} + +__code cs42(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,a,e,c); +} + +__code cs43(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,e,a,c); +} + +__code cs44(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,d,e,c,a); +} + +__code cs45(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,b,e,c); +} + +__code cs46(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,b,e,c); +} + +__code cs47(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,a,e,c); +} + +__code cs48(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,e,a,c); +} + +__code cs49(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,b,e,c,a); +} + +__code cs50(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,e,b,c); +} + +__code cs51(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,e,b,c); +} + +__code cs52(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,a,b,c); +} + +__code cs53(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,b,a,c); +} + +__code cs54(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,b,c,a); +} + +__code cs55(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,d,e,c,b); +} + +__code cs56(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,a,e,c,b); +} + +__code cs57(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,a,c,b); +} + +__code cs58(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,c,a,b); +} + +__code cs59(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, d,e,c,b,a); +} + +__code cs60(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,c,e,d); +} + +__code cs61(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,c,e,d); +} + +__code cs62(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,a,e,d); +} + +__code cs63(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,e,a,d); +} + +__code cs64(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,c,e,d,a); +} + +__code cs65(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,b,e,d); +} + +__code cs66(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,b,e,d); +} + +__code cs67(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,a,e,d); +} + +__code cs68(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,e,a,d); +} + +__code cs69(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,b,e,d,a); +} + +__code cs70(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,e,b,d); +} + +__code cs71(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,e,b,d); +} + +__code cs72(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,a,b,d); +} + +__code cs73(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,b,a,d); +} + +__code cs74(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,b,d,a); +} + +__code cs75(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,c,e,d,b); +} + +__code cs76(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,a,e,d,b); +} + +__code cs77(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,a,d,b); +} + +__code cs78(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,d,a,b); +} + +__code cs79(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, c,e,d,b,a); +} + +__code cs80(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,e,c,d); +} + +__code cs81(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,e,c,d); +} + +__code cs82(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,a,c,d); +} + +__code cs83(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,c,a,d); +} + +__code cs84(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,c,d,a); +} + +__code cs85(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,b,c,d); +} + +__code cs86(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,b,c,d); +} + +__code cs87(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,a,c,d); +} + +__code cs88(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,c,a,d); +} + +__code cs89(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,c,d,a); +} + +__code cs90(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,c,b,d); +} + +__code cs91(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,c,b,d); +} + +__code cs92(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,a,b,d); +} + +__code cs93(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,b,a,d); +} + +__code cs94(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,b,d,a); +} + +__code cs95(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,c,d,b); +} + +__code cs96(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,c,d,b); +} + +__code cs97(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,a,d,b); +} + +__code cs98(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,d,a,b); +} + +__code cs99(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,c,d,b,a); +} + +__code cs100(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,b,e,d,c); +} + +__code cs101(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,a,e,d,c); +} + +__code cs102(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,a,d,c); +} + +__code cs103(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,d,a,c); +} + +__code cs104(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, b,e,d,c,a); +} + +__code cs105(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,b,d,c); +} + +__code cs106(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,b,d,c); +} + +__code cs107(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,a,d,c); +} + +__code cs108(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,d,a,c); +} + +__code cs109(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,b,d,c,a); +} + +__code cs110(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,d,b,c); +} + +__code cs111(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,d,b,c); +} + +__code cs112(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,a,b,c); +} + +__code cs113(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,b,a,c); +} + +__code cs114(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,b,c,a); +} + +__code cs115(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, a,e,d,c,b); +} + +__code cs116(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,a,d,c,b); +} + +__code cs117(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,a,c,b); +} + +__code cs118(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,c,a,b); +} + +__code cs119(int i, int a, int b, int c, int d, int e) { + //dprint("a=%d,b=%d,c=%d,d=%d,e=%d\n", a, b, c, d, e); + goto schedule(i, e,d,c,b,a); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/code_segment_pointer_check/code_segment_pointer_check2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/code_segment_pointer_check/code_segment_pointer_check2.h Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,369 @@ +/* defined in file code_segment_pointer_check2.cbc at offset 987 */ +__code end (int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1102 */ +__code schedule (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1345 */ +int main (); + +/* defined in file code_segment_pointer_check2.cbc at offset 1398 */ +__code cs0 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1542 */ +__code cs1 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1686 */ +__code cs2 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1830 */ +__code cs3 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 1974 */ +__code cs4 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2118 */ +__code cs5 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2262 */ +__code cs6 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2406 */ +__code cs7 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2550 */ +__code cs8 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2694 */ +__code cs9 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2838 */ +__code cs10 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 2983 */ +__code cs11 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3128 */ +__code cs12 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3273 */ +__code cs13 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3418 */ +__code cs14 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3563 */ +__code cs15 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3708 */ +__code cs16 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3853 */ +__code cs17 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 3998 */ +__code cs18 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4143 */ +__code cs19 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4288 */ +__code cs20 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4433 */ +__code cs21 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4578 */ +__code cs22 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4723 */ +__code cs23 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 4868 */ +__code cs24 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5013 */ +__code cs25 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5158 */ +__code cs26 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5303 */ +__code cs27 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5448 */ +__code cs28 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5593 */ +__code cs29 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5738 */ +__code cs30 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 5883 */ +__code cs31 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6028 */ +__code cs32 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6173 */ +__code cs33 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6318 */ +__code cs34 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6463 */ +__code cs35 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6608 */ +__code cs36 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6753 */ +__code cs37 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 6898 */ +__code cs38 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7043 */ +__code cs39 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7188 */ +__code cs40 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7333 */ +__code cs41 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7478 */ +__code cs42 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7623 */ +__code cs43 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7768 */ +__code cs44 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 7913 */ +__code cs45 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8058 */ +__code cs46 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8203 */ +__code cs47 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8348 */ +__code cs48 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8493 */ +__code cs49 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8638 */ +__code cs50 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8783 */ +__code cs51 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 8928 */ +__code cs52 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9073 */ +__code cs53 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9218 */ +__code cs54 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9363 */ +__code cs55 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9508 */ +__code cs56 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9653 */ +__code cs57 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9798 */ +__code cs58 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 9943 */ +__code cs59 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10088 */ +__code cs60 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10233 */ +__code cs61 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10378 */ +__code cs62 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10523 */ +__code cs63 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10668 */ +__code cs64 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10813 */ +__code cs65 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 10958 */ +__code cs66 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11103 */ +__code cs67 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11248 */ +__code cs68 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11393 */ +__code cs69 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11538 */ +__code cs70 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11683 */ +__code cs71 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11828 */ +__code cs72 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 11973 */ +__code cs73 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12118 */ +__code cs74 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12263 */ +__code cs75 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12408 */ +__code cs76 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12553 */ +__code cs77 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12698 */ +__code cs78 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12843 */ +__code cs79 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 12988 */ +__code cs80 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13133 */ +__code cs81 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13278 */ +__code cs82 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13423 */ +__code cs83 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13568 */ +__code cs84 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13713 */ +__code cs85 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 13858 */ +__code cs86 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14003 */ +__code cs87 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14148 */ +__code cs88 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14293 */ +__code cs89 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14438 */ +__code cs90 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14583 */ +__code cs91 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14728 */ +__code cs92 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 14873 */ +__code cs93 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15018 */ +__code cs94 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15163 */ +__code cs95 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15308 */ +__code cs96 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15453 */ +__code cs97 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15598 */ +__code cs98 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15743 */ +__code cs99 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 15888 */ +__code cs100 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16034 */ +__code cs101 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16180 */ +__code cs102 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16326 */ +__code cs103 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16472 */ +__code cs104 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16618 */ +__code cs105 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16764 */ +__code cs106 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 16910 */ +__code cs107 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17056 */ +__code cs108 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17202 */ +__code cs109 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17348 */ +__code cs110 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17494 */ +__code cs111 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17640 */ +__code cs112 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17786 */ +__code cs113 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 17932 */ +__code cs114 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 18078 */ +__code cs115 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 18224 */ +__code cs116 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 18370 */ +__code cs117 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 18516 */ +__code cs118 (int i, int a, int b, int c, int d, int e); + +/* defined in file code_segment_pointer_check2.cbc at offset 18662 */ +__code cs119 (int i, int a, int b, int c, int d, int e); + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/conv.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/conv.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,92 @@ +#include "stdio.h" + +f0(int i) { + int k,j; + k = 3+i; + j = g0(i+3); + return k+4+j; +} + +g0(int i) { + return i+4; +} + + +typedef void *stack; + +__code f_g0(int i,int k,stack sp) ; + +struct cont_interface { // General Return Continuation + __code (*ret)(int, void*); +}; + +__code f(int i,stack sp) { + int k,j; + k = 3+i; + goto f_g0(i,k,sp); +} + +struct f_g0_interface { // Specialized Return Continuation + __code (*ret)(); + int i_,k_,j_; +}; + +__code f_g1(int j,stack sp); +__code g(int i,stack sp) ; + +__code f_g0(int i,int k,stack sp) { // Caller + struct f_g0_interface *c = + (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface)); + + c->ret = f_g1; + c->k_ = k; + c->i_ = i; + + goto g(i+3,sp); +} + +__code f_g1(int j,stack sp) { // Continuation + struct f_g0_interface *c = (struct f_g0_interface *)sp; + int k = c->k_; + sp += sizeof(struct f_g0_interface); + goto (( (struct cont_interface *)sp)->ret)(k+4+j,sp); +} + +__code g(int i,stack sp) { + goto (( (struct cont_interface *)sp)->ret)(i+4,sp); +} + +struct main_continuation { // General Return Continuation + __code (*ret)(int, void*); + __code (*main_ret)(int, void*); + void *env; +}; + +__code main_return(int i,stack sp) { + printf("#0061:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(i, + ((struct main_continuation *)sp)->env); +} + +#define STACK_SIZE 2048 +char main_stack[STACK_SIZE]; +#define stack_last (&main_stack[STACK_SIZE]) + +typedef __code (*return_type)(int, void*); +int +main(int argc, char **argv) +{ + struct main_continuation *cont; + stack sp = stack_last; + + printf("#0075:%d\n",f0(233)); + + sp -= sizeof(*cont); + cont = (struct main_continuation *)sp; + cont->ret = main_return; + cont->main_ret = (return_type) _CbC_return; + cont->env = _CbC_environment; + goto f(233,sp); +} + +/* end */ diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/conv1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/conv1.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,225 @@ +#include "stdio.h" + +static int loop; + +#if 1 // def __micro_c__ +#define CC_ONLY 0 +#else +#define CC_ONLY 1 +#endif + +/* classical function call case (0) */ + +f0(int i) { + int k,j; + k = 3+i; + j = g0(i+3); + return k+4+j; +} + +g0(int i) { + return h0(i+4)+i; +} + +h0(int i) { + return i+4; +} + +#if !CC_ONLY + +/* straight conversion case (1) */ + +typedef char *stack; + +struct cont_interface { // General Return Continuation + __code (*ret)(int, void *); +}; + +__code f(int i,stack sp) { + int k,j; + k = 3+i; + goto f_g0(i,k,sp); +} + +struct f_g0_interface { // Specialized Return Continuation + __code (*ret)(int, void *); + int i_,k_,j_; +}; + +__code f_g1(int j,stack sp); + +__code f_g0(int i,int k,stack sp) { // Caller + struct f_g0_interface *c = + (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface)); + + c->ret = f_g1; + c->k_ = k; + c->i_ = i; + + goto g(i+3,sp); +} + +__code f_g1(int j,stack sp) { // Continuation + struct f_g0_interface *c = (struct f_g0_interface *)sp; + int k = c->k_; + sp+=sizeof(struct f_g0_interface); + c = (struct f_g0_interface *)sp; + goto (c->ret)(k+4+j,sp); +} + +__code g_h1(int j,stack sp); + +__code g(int i,stack sp) { // Caller + struct f_g0_interface *c = + (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface)); + + c->ret = g_h1; + c->i_ = i; + + goto h(i+3,sp); +} + +__code g_h1(int j,stack sp) { // Continuation + struct f_g0_interface *c = (struct f_g0_interface *)sp; + int i = c->i_; + sp+=sizeof(struct f_g0_interface); + c = (struct f_g0_interface *)sp; + goto (c->ret)(j+i,sp); +} + +__code h(int i,stack sp) { + struct f_g0_interface *c = (struct f_g0_interface *)sp; + goto (c->ret)(i+4,sp); +} + +struct main_continuation { // General Return Continuation + __code (*ret)(); + __code (*main_ret)(); + void *env; +}; + +__code main_return(int i,stack sp) { + if (loop-->0) + goto f(233,sp); + printf("#0103:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); +} + +/* little optimzation without stack continuation (2) */ + +__code f2(int i,char *sp) { + int k,j; + k = 3+i; + goto g2(i,k,i+3,sp); +} + +__code g2(int i,int k,int j,char *sp) { + j = j+4; + goto h2(i,k+4+j,sp); +} + +__code h2_1(int i,int k,int j,char *sp) { + goto main_return2(i+j,sp); +} + +__code h2(int i,int k,char *sp) { + goto h2_1(i,k,i+4,sp); +} + +__code main_return2(int i,stack sp) { + if (loop-->0) + goto f2(233,sp); + printf("#0132:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); +} + +/* little optimizaed case (3) */ + +__code f2_1(int i,char *sp) { + int k,j; + k = 3+i; + goto g2_1(k,i+3,sp); +} + +__code g2_1(int k,int i,char *sp) { + goto h2_11(k,i+4,sp); +} + +__code f2_0_1(int k,int j,char *sp); +__code h2_1_1(int i,int k,int j,char *sp) { + goto f2_0_1(k,i+j,sp); +} + +__code h2_11(int i,int k,char *sp) { + goto h2_1_1(i,k,i+4,sp); +} + +__code f2_0_1(int k,int j,char *sp) { + goto (( (struct cont_interface *)sp)->ret)(k+4+j,sp); +} + +__code main_return2_1(int i,stack sp) { + if (loop-->0) + goto f2_1(233,sp); + printf("#0165:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); +} + +#define STACK_SIZE 2048 +char main_stack[STACK_SIZE]; +#define stack_last (main_stack+STACK_SIZE) + +#endif + +#define LOOP_COUNT 10000000 + +main(int ac,char *av[]) +{ +#if !CC_ONLY + struct main_continuation *cont; + stack sp = stack_last; +#endif + int sw; + int j; + if (ac==2) sw = atoi(av[1]); + else sw=3; + + if (sw==0) { + for(loop=0;loopret = main_return; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f(233,sp); + } else if (sw==2) { + loop = LOOP_COUNT; + sp -= sizeof(*cont); + cont = (struct main_continuation *)sp; + cont->ret = main_return2; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f2(233,sp); + } else if (sw==3) { + loop = LOOP_COUNT; + sp -= sizeof(*cont); + cont = (struct main_continuation *)sp; + cont->ret = main_return2_1; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f2_1(233,sp); +#endif + } +return 0; +} + +/* end */ diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/conv1/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/conv1/Makefile Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,11 @@ +CbCC = ../../../build_cbc44/INSTALL_DIR/libexec/gcc/i686-pc-linux-gnu/4.4.1/cc1 + + +time: + for exe in *; do \ + if [ -x $$exe ]; then \ + echo $$exe; \ + time ./$$exe; \ + fi; \ + done + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/conv1/conv1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/conv1/conv1.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,227 @@ +#include +static int loop; + +#if 1 // def __micro_c__ +#define CC_ONLY 0 +#else +#define CC_ONLY 1 +#endif + +typedef char *stack; +#include "conv1.h" + +/* classical function call case (0) */ + +f0(int i) { + int k,j; + k = 3+i; + j = g0(i+3); + return k+4+j; +} + +g0(int i) { + return h0(i+4)+i; +} + +h0(int i) { + return i+4; +} + +#if !CC_ONLY + +/* straight conversion case (1) */ + + +struct cont_interface { // General Return Continuation + __code (*ret)(); +}; + +__code f(int i,stack sp) { + int k,j; + k = 3+i; + goto f_g0(i,k,sp); +} + +struct f_g0_interface { // Specialized Return Continuation + __code (*ret)(); + int i_,k_,j_; +}; + +__code f_g1(int j,stack sp); + +__code f_g0(int i,int k,stack sp) { // Caller + struct f_g0_interface *c = + (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface)); + + c->ret = f_g1; + c->k_ = k; + c->i_ = i; + + goto g(i+3,sp); +} + +__code f_g1(int j,stack sp) { // Continuation + struct f_g0_interface *c = (struct f_g0_interface *)sp; + int k = c->k_; + sp+=sizeof(struct f_g0_interface); + c = (struct f_g0_interface *)sp; + goto (c->ret)(k+4+j,sp); +} + +__code g_h1(int j,stack sp); + +__code g(int i,stack sp) { // Caller + struct f_g0_interface *c = + (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface)); + + c->ret = g_h1; + c->i_ = i; + + goto h(i+3,sp); +} + +__code g_h1(int j,stack sp) { // Continuation + struct f_g0_interface *c = (struct f_g0_interface *)sp; + int i = c->i_; + sp+=sizeof(struct f_g0_interface); + c = (struct f_g0_interface *)sp; + goto (c->ret)(j+i,sp); +} + +__code h(int i,stack sp) { + struct f_g0_interface *c = (struct f_g0_interface *)sp; + goto (c->ret)(i+4,sp); +} + +struct main_continuation { // General Return Continuation + __code (*ret)(); + __code (*main_ret)(int,void*); + void *env; +}; + +__code main_return(int i,stack sp) { + if (loop-->0) + goto f(233,sp); + printf("#0103:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); +} + +/* little optimzation without stack continuation (2) */ + +__code f2(int i,char *sp) { + int k,j; + k = 3+i; + goto g2(i,k,i+3,sp); +} + +__code g2(int i,int k,int j,char *sp) { + j = j+4; + goto h2(i,k+4+j,sp); +} + +__code h2_1(int i,int k,int j,char *sp) { + goto main_return2(i+j,sp); +} + +__code h2(int i,int k,char *sp) { + goto h2_1(i,k,i+4,sp); +} + +__code main_return2(int i,stack sp) { + if (loop-->0) + goto f2(233,sp); + printf("#0132:%d\n",i); + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); +} + +/* little optimizaed case (3) */ + +__code f2_1(int i,char *sp) { + int k,j; + k = 3+i; + goto g2_1(k,i+3,sp); +} + +__code g2_1(int k,int i,char *sp) { + goto h2_11(k,i+4,sp); +} + +__code f2_0_1(int k,int j,char *sp); +__code h2_1_1(int i,int k,int j,char *sp) { + goto f2_0_1(k,i+j,sp); +} + +__code h2_11(int i,int k,char *sp) { + goto h2_1_1(i,k,i+4,sp); +} + +__code f2_0_1(int k,int j,char *sp) { + goto (( (struct cont_interface *)sp)->ret)(k+4+j,sp); +} + +__code main_return2_1(int i,stack sp) { + if (loop-->0) + goto f2_1(233,sp); + printf("#0165:%d\n",i); + exit(0); + //goto (( (struct main_continuation *)sp)->main_ret)(0, + //((struct main_continuation *)sp)->env); +} + +#define STACK_SIZE 2048 +char main_stack[STACK_SIZE]; +#define stack_last (main_stack+STACK_SIZE) + +#endif + +#define LOOP_COUNT 500000000 +int +main(int ac,char *av[]) +{ +#if !CC_ONLY + struct main_continuation *cont; + stack sp = stack_last; +#endif + int sw; + int j; + if (ac==2) sw = atoi(av[1]); + else sw=3; + + if (sw==0) { + for(loop=0;loopret = main_return; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f(233,sp); + } else if (sw==2) { + loop = LOOP_COUNT; + sp -= sizeof(*cont); + cont = (struct main_continuation *)sp; + cont->ret = main_return2; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f2(233,sp); + } else if (sw==3) { + loop = LOOP_COUNT; + sp -= sizeof(*cont); + cont = (struct main_continuation *)sp; + cont->ret = main_return2_1; + cont->main_ret = _CbC_return; + cont->env = _CbC_environment; + goto f2_1(233,sp); +#endif + } +return 0; +} + +/* end */ diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/conv1/conv1.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/conv1/conv1.h Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,54 @@ +/* defined in file conv1.c at offset 468 */ +__code f (int i,stack sp); + +/* defined in file conv1.c at offset 680 */ +__code f_g0 (int i,int k,stack sp); + +/* defined in file conv1.c at offset 897 */ +__code f_g1 (int j,stack sp); + +/* defined in file conv1.c at offset 1162 */ +__code g (int i,stack sp); + +/* defined in file conv1.c at offset 1355 */ +__code g_h1 (int j,stack sp); + +/* defined in file conv1.c at offset 1588 */ +__code h (int i,stack sp); + +/* defined in file conv1.c at offset 1838 */ +__code main_return (int i,stack sp); + +/* defined in file conv1.c at offset 2107 */ +__code f2 (int i,char *sp); + +/* defined in file conv1.c at offset 2189 */ +__code g2 (int i,int k,int j,char *sp); + +/* defined in file conv1.c at offset 2270 */ +__code h2_1 (int i,int k,int j,char *sp); + +/* defined in file conv1.c at offset 2346 */ +__code h2 (int i,int k,char *sp); + +/* defined in file conv1.c at offset 2410 */ +__code main_return2 (int i,stack sp); + +/* defined in file conv1.c at offset 2658 */ +__code f2_1 (int i,char *sp); + +/* defined in file conv1.c at offset 2742 */ +__code g2_1 (int k,int i,char *sp); + +/* defined in file conv1.c at offset 2844 */ +__code h2_1_1 (int i,int k,int j,char *sp); + +/* defined in file conv1.c at offset 2918 */ +__code h2_11 (int i,int k,char *sp); + +/* defined in file conv1.c at offset 2987 */ +__code f2_0_1 (int k,int j,char *sp); + +/* defined in file conv1.c at offset 3086 */ +__code main_return2_1 (int i,stack sp); + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/loto6.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/loto6.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,80 @@ +/* + * Nov 10, 2009 + * created by gongo. + * + * Nov 10, 2009 + * modified by kent. + */ + +#include +#include + +(*ret)(int, void*); +void *env; + + +__code +print(int *numbers) +{ + printf("%d-%d-%d-%d-%d-%d\n", numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5]); + free(numbers); + goto ret(0, env); +} + + __code +take(int *array, int size, int length) +{ + int *taked = (int*)malloc(sizeof(int)*length); + + memcpy(taked, array, sizeof(int)*length); + free(array); + + goto print(taked); +} + +__code +shuffle(int *array, int size, int idx) +{ + int j = random() % size; + int tmp = array[idx]; + array[idx] = array[j]; + array[j] = tmp; + + if (++idx < size) { + goto shuffle(array, size, idx); + } else { + goto take(array, size, 6); + } +} + +__code +range_loop(int *array, int idx, int from, int to, int step, int size) +{ + array[idx] = from; + + if (from+step > to) { + goto shuffle(array, size, 0); + } else { + goto range_loop(array, idx+1, from+step, to, step, size); + } +} + +__code +range(int from, int to, int step) +{ + int size = (to-from+1)/step; + int *array = (int*)malloc(sizeof(int)*size); + + goto range_loop(array, 0, from, to, step, size); +} + +int +main() +{ + srand(time(NULL)); + ret = _CbC_return; + env = _CbC_environment; + + goto range(1, 43, 1); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/matrix/compute_power.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/matrix/compute_power.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,107 @@ +#include +#include "matrix.h" + +void compute(); +double ** create_identity_matrix(int size); +double ** multiply(double **a, double **b, int l, int m, int n); +void print_matrix(double **a, int row, int col); + +int +main(int argc, char **argv) +{ + compute(); + return 0; +} + +void +compute() +{ + double **A, **B, **C; + A = create_identity_matrix(4); + B = create_identity_matrix(4); + printf("A = \n"); + print_matrix(A, 4, 4); + printf("B = \n"); + print_matrix(B, 4, 4); + + C = multiply(A, B, 4,4,4); + printf("C = \n"); + print_matrix(C, 4, 4); + + + free(A); + free(B); + free(C); +} + +double ** +create_identity_matrix(int size) +{ + int i,j; + double **ret; + ret = create_matrix(sizeof(double), size, size); + + for (j=0; j +#include + +//size_t size; +int size; +typedef int test_int; + +test_int ti; + +void end(){ + exit(0); +} + +int main(int argc, char **argv){ + size=0; + ti=10; + + printf("main: "); + printf("normal:%d\n", argc); + + size = 10; + printf("size = %d\n", size); + printf(" ti = %d\n", ti); + end(); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/normal2.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/normal2.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,65 @@ +//#include +//#include + +struct abc { + int a; + double b; + char c; + double *d; +}; + +struct def { + int d; + struct abc e; + struct abc *f; +}; + +void print_abc(struct abc a){ + printf("\tstruct abc:\n"); + printf("\ta=%d, b=%lf, c=%d, d=%p\n", a.a, a.b, a.c, a.d); +} +void print_def(struct def b){ + printf("\tstruct def:\n"); + printf("\ta=%d, b=%p\n", b.d, b.f); + print_abc(b.e); +} + +void cs_exit(int a){ + printf("cs_exit : a=%d.\n", a); + exit(a); +} + +void cs0(struct abc a, struct def b, int c){ + printf("cs0 :\n"); + print_abc(a); + print_def(b); + return cs_exit( c*a.a+b.e.c ); +} + + +void cs_goto(int c, struct abc a, struct def b){ + printf("cs_return :\n"); + print_abc(a); + print_def(b); + return cs0(a, b, c); +} + +int main(int argc, char **argv){ + struct abc A; + struct def B; + //int a=10, b=20, c=30, d=40, e=50, f=60, g=70; + A.a = 10, A.b = 20.02, A.c = '\0', A.d = 0; + B.d = 30, B.f = &A; + B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = 0; + + printf("main :\n"); + print_abc(A); + print_def(B); + //printf("20*%d + 30*%d + 40*%d + 50*%d =\n", a, b, c, d); + cs_goto(100, A, B); + return 0; +} + + + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/parallel_check/c-int-double.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/parallel_check/c-int-double.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,46 @@ +#include +#include + +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(1), ## args) + +int +test(int a) +{ + return (int)pow(a, 2.0); +} + +int +callee(double a, double b, double c, int d) +{ + dprint("a=%d,b=%d,c=%d,d=%d\n", a,b,c,d); + return a+b+c+d; +} + +int +caller(int a, double b, double c, double d) +{ + int x; + double y,z,w; + //x = test(a); + //y = test(b); + //z = test(c); + //w = test(d); + x=a, y=b; + z=c, w=d; + + return callee(y,z,w,x); + //return callee(b,c,d, a); +} + +int +main (int argc, char **argv) +{ + int r; + r = caller(11,22,33,44); + //r = caller(11,22,33,44, 55,66,77,88); + printf("r = %d\n", r); +} + + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/parallel_check/c-int.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/parallel_check/c-int.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,71 @@ +#include +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(1), ## args) + +void +callee(int a, int b, int c, int d) +{ + int r; + dprint("a=%d,b=%d,c=%d,d=%d\n", a,b,c,d); + r = a+b+c+d; + printf("r = %d\n", r); + return; +} + +void +caller1(int a, int b, int c, int d) +{ + int x,y,z,w; + x=a, y=b; + z=c, w=d; + + callee(x,y,z,w); + return; +} + +void +caller2(int a, int b, int c, int d) +{ + int x,y,z,w; + x=a, y=b; + z=c, w=d; + + callee(y,z,w,x); + return; +} + +void +caller3(int a, int b, int c, int d) +{ + callee(b,c,d,a); + return; +} + +void +caller4(int a, int b, int c, int d) +{ + callee(a+b,b+c,c+d,d+a); + return; +} + +void +caller5(int a, int b, int c, int d) +{ + int x,y,z,w; + x = a+b; + y = b+c; + z = c+d; + w = d+a; + + callee(x,y,z,w); + return; +} + +int +main (int argc, char **argv) +{ + int r; + caller(11,22,33,44); + //r = caller(11,22,33,44, 55,66,77,88); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/parallel_check/c-struct.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/parallel_check/c-struct.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,51 @@ +#include +#include + +#define dprint(f, args...) \ + printf("in %s env=%p: "f, __FUNCTION__, __builtin_frame_address(1), ## args) + +typedef struct { + int a; + double b; + char *c; +} STRUCT; + +int +test(int a) +{ + return (int)pow(a, 2.0); +} + + +int +callee(int a, STRUCT s, int b) + /* |-|----|-| */ +{ + dprint("a=%d,b=%d\n", a,b); + dprint("s.a=%d,s.b=%lf,s.c=%s\n", s.a, s.b, s.c); + return a+b+ s.a; +} + +int +caller(STRUCT s, int a, double b) + /* |----|-|--| */ +{ + STRUCT s0;// = {44, 55.5, "aiueo2"}; + //int a0 = 55; + //a0 = a; + s0 = s; + + return callee(10, s0, 20); +} + +int +main (int argc, char **argv) +{ + int r; + STRUCT s = { 33, 44.4, "aiueo" }; + + r = caller(s, 11, 22.2); + //r = caller(11,22,33,44, 55,66,77,88); + printf("r = %d\n", r); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/Makefile Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,39 @@ + +CbCC=../../BUILD/INSTALL_DIR/bin/gcc + +#CC=gcc +#CC=../../../build_gcc/INSTALL_DIR/bin/gcc +CC=../../BUILD/INSTALL_DIR/bin/gcc + +HEADERMAKER=../../CbC-scripts/make_headers.py2 + +# fastcall版では-O0,-O2は動作確認、-O3以上はだめ +#CFLAGS=-g -O2 -fomit-frame-pointer +#CFLAGS=-g -O2 +CFLAGS=-g -O0 +#CFLAGS=-g -Os # an error occurred. + +.SUFFIXES: .cbc .o + +all: quicksort_cbc quicksort_c quicksort_cbc2 + +.cbc.o: + $(CbCC) $(CFLAGS) -c -o $@ $< +.cbc.h: + $(HEADERMAKER) $^ > $@ + +quicksort_cbc.o: quicksort_cbc.h +quicksort_cbc2.o: quicksort_cbc2.h +quicksort_test.o: quicksort_test.h + +quicksort_cbc: quicksort_cbc.o quicksort_test.o + $(CC) $(CFLAGS) -o $@ $^ +quicksort_cbc2: quicksort_cbc2.o quicksort_test.o + $(CC) $(CFLAGS) -o $@ $^ + +quicksort_c: quicksort_c.o + $(CC) $(CFLAGS) -o $@ $^ + + +clean: + rm -rf *.o *.s quicksort_c quicksort_cbc quicksort_cbc2 diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/benchmark.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/benchmark.sh Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,44 @@ +#!/usr/bin/env zsh + +time=/usr/bin/time +QS=./quicksort_cbc +size=10000000 +seed=123456789 +num=10 + + +max=0 +min=99999 +count=0 +amount=0 + +echo "size of array = $size" +while [[ $count -lt $num ]]; do + usertime=$( $time -p $QS -n $size -s $seed 2>&1 >& - |grep '^user'|tr -s " "|cut -f2 -d" ") + #usertime=$(printf "%d" $usertime) + echo $usertime + + amount=$(($usertime+$amount)) + if [[ $usertime -lt $min ]]; then + min=$usertime + fi + if [[ $usertime -gt $max ]]; then + max=$usertime + fi + #seed=$seed[1,-2] + seed=$(($seed+10)) + count=$(($count+1)) +done + +echo "amount time = $amount" +echo "maxtime = $max" +echo "mintime = $min" + +amount=$(($amount - $max - $min)) +echo "amount time - mintime - maxtime = $amount" +count=$(($count-2)) +echo "count = $count" +averagetime=$(($amount/($count))) +echo "average time = $averagetime" + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/mc/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/mc/Makefile Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,39 @@ + +CbCC=../../../../device/mc + +#CC=gcc +CC=../../../../build_gcc/INSTALL_DIR/bin/gcc + +HEADERMAKER=../../../CbC-scripts/make_headers.py2 + +CFLAGS=-g -Wall + +.SUFFIXES: .cbc .o .s .c + +all: quicksort_cbc quicksort_c quicksort_cbc2 + +quicksort_c.c quicksort_cbc.cbc quicksort_cbc2.cbc quicksort_test.cbc benchmark.sh: + ln -s ../$@ + +.s.o: + $(CC) -c -o $@ $< +.cbc.s: + $(CbCC) $< +.cbc.h: + $(HEADERMAKER) $^ > $@ + +quicksort_cbc.o: quicksort_cbc.h +quicksort_cbc2.o: quicksort_cbc2.h +quicksort_test.o: quicksort_test.h + +quicksort_cbc: quicksort_cbc.o quicksort_test.o + $(CC) $(CFLAGS) -o $@ $^ +quicksort_cbc2: quicksort_cbc2.o quicksort_test.o + $(CC) $(CFLAGS) -o $@ $^ + +quicksort_c: quicksort_c.o + $(CC) $(CFLAGS) -o $@ $^ + + +clean: + rm -rf *.o *.s quicksort_c quicksort_cbc quicksort_cbc2 diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/quicksort_c.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/quicksort_c.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,183 @@ +#include +#include +#include +#include + +static inline void +SWAP (int *a, int *b) +{ + int tmp; + tmp = *a; + *a = *b; + *b = tmp; +} + +static inline int +mid_point(int a, int b, int c) +{ + if (a < b) { + if (b < c) + return b; + else if (a < c) + return c; + else + return a; + } else { + if (a < c) + return a; + else if (b < c) + return c; + else + return b; + } +} + +void +selectsort(int *v, int s0, int e0) +{ + int i,j; + int m; + int size = e0-s0+1; + v += s0; + for (i=0; i v[j]) + m = j; + } + if (m!=i) + SWAP(&v[i],&v[m]); + } + return; +} + +void +quicksort(int *v, int s0, int e0) +{ + int p; + int s=s0, e=e0; +#if 0 + if (e<=s) return; + if (e-s<5) { + selectsort(v,s0,e0); + return; + } +#else + if (e<=s) return; +#endif + + //p = (v[s]+v[(s+e)/2]+v[e])/3; + p = mid_point(v[s],v[e],v[(s+e)/2]); + + while (1) { + while (v[s] v[i+1]) + return 0; + } + return 1; +} + +void +random_initialize(int *v, int size, int min, int max) +{ + int i; + int diff = max-min+1; + + for (i=0; i +#include +#include + +typedef void *stack; +typedef struct { + int size; + void *interface; + __code (*ret)(void*, stack) ; +} frame, *framep; + +/* quickstart main routine. */ +typedef struct { + int *v; + int s; + int e; +} QS_IF ; +typedef __code (*RET)(void*); + +#include"quicksort_cbc.h" + +/* for check. */ +void *mustbefreed; + +__code returner(stack sp) +{ + framep fp = (framep)sp; + sp += fp->size; + goto fp->ret(fp->interface, sp); +} + +__code quicksort_start(void *arg, stack sp) +{ + QS_IF *recvif = arg; + int a,b,c,p; + a = recvif->v[recvif->s]; + b = recvif->v[recvif->e]; + c = recvif->v[(recvif->s+recvif->e)/2]; + + //printf("quicksort_start: s=%d,e=%d", recvif->s, recvif->e); + if (recvif->e <= recvif->s) goto returner(sp); + + if (a < b) { + if (b < c) + p = b; + else if (a < c) + p = c; + else + p = a; + } else { + if (a < c) + p = a; + else if (b < c) + p = c; + else + p = b; + } + + goto quicksort_divider (recvif, recvif->s, recvif->e, p, sp); +} +/* main routine end. */ + +/* divide routine. */ +__code quicksort_divider(QS_IF *recvif, int s, int e, int p, stack sp) +{ + goto quicksort_divider_s(recvif, s, e, p, sp); +} +__code quicksort_divider_s(QS_IF *recvif, int s, int e, int p, stack sp) +{ + if (recvif->v[s]v[e]) { + e--; + goto quicksort_divider_e(recvif, s, e, p, sp); + } else + goto quicksort_swapper(recvif, s, e, p, sp); +} +__code quicksort_swapper(QS_IF *recvif, int s, int e, int p, stack sp) +{ + if (sv[s]; + recvif->v[s] = recvif->v[e]; + recvif->v[e] = tmp; + goto quicksort_divider(recvif, s+1, e-1, p, sp); + } else { + goto quicksort_treecall(recvif, s, e, sp); + } +} +/* divide routin end. */ + + +/* recursive call routine. */ +__code quicksort_treecall(QS_IF *recvif, int s, int e, stack sp) +{ + framep fp; + QS_IF *outif; + + /* interface for first quicksort_start this segment directly jump to. */ + outif = (sp-=sizeof(QS_IF)); + outif->v = recvif->v; + outif->s = recvif->s; + outif->e = e; + fp = (sp-=sizeof(frame)); + fp->ret = quicksort_start; + fp->interface = recvif; + fp->size = sizeof(frame)+sizeof(QS_IF); + + /* recvif is used by second quicksort_start. */ + recvif->s = e+1; + goto quicksort_start(outif, sp); +} +/* recursive call routine end. */ + +#define STACK_SIZE 10240 + +typedef struct { + __code (*ret)(void*); + void *ret_arg; + stack *sp; +} QS_FINISH; +__code +quicksort(int *v, int s, int e, RET ret, void *arg ) +{ + framep fp; + stack sp0, sp; + sp0 = mustbefreed = malloc(STACK_SIZE); + sp = sp0 + STACK_SIZE; + QS_FINISH *finish_if; + QS_IF *outif; + + /* interface for quicksort_finish. */ + finish_if = (sp -= sizeof(QS_FINISH)); + finish_if->ret = ret; + finish_if->ret_arg = arg; + finish_if->sp = sp0; + + /* interface for quicksort_start. */ + outif = (sp -= sizeof(QS_IF)); + outif->v = v; + outif->s = s; + outif->e = e; + /* frame for quicksort_finish. */ + fp = (sp -= sizeof(frame)); + fp->ret = quicksort_finish; + fp->interface = finish_if; + fp->size = sizeof(frame)+sizeof(QS_IF); + + goto quicksort_start(outif, sp); +} +__code +quicksort_finish(void *arg, stack sp) +{ + QS_FINISH interface; + interface = *(QS_FINISH*)arg; + //assert((void*)interface.sp==(void*)mustbefreed); + free(interface.sp); + goto interface.ret(interface.ret_arg); +} + + + +#if 0 +void +quicksort_c(int *v, int s0, int e0, stack sp) +{ + int p; + int s=s0, e=e0; + if (e<=s) return; + + //p = (v[s]+v[(s+e)/2]+v[e])/3; + p = mid_point(v[s],v[e],v[(s+e)/2]); + + while (1) { + while (v[s]ret = caller_finish; + fp->interface = NULL; + fp->size = sizeof(*outif)+sizeof(frame); + + goto quicksort_start(outif, sp); +} +__code caller_finish0(void *arg, stack sp) +{ +} + +__code __returner0(void *arg , stack sp) +{ + framep fp = sp; + sp += fp->size; + goto fp->ret(fp->interface, sp); +} + +#endif + + + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/quicksort_cbc2.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/quicksort_cbc2.cbc Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,159 @@ +#include +#include +#include + +typedef struct { + int *v; + int s; + int e; +} QS_IF; + +typedef void *stack; +typedef __code (*RET)(QS_IF, stack); +typedef struct { + int size; + QS_IF interface; + RET ret; +} frame, *framep; + +typedef __code (*RETTYPE)(void*); +typedef struct { + RETTYPE ret; + void *ret_arg; + stack *sp; +} QS_FINISH; +#define STACK_SIZE 10240 + +#include"quicksort_cbc2.h" + +__code returner(stack sp) +{ + framep fp = (framep)sp; + sp += fp->size; + goto fp->ret(fp->interface, sp); +} + +__code quicksort_start(QS_IF recvif, stack sp) +{ + int a,b,c,p; + a = recvif.v[recvif.s]; + b = recvif.v[recvif.e]; + c = recvif.v[(recvif.s+recvif.e)/2]; + + //printf("quicksort_start: s=%d,e=%d", recvif->s, recvif->e); + if (recvif.e <= recvif.s) goto returner(sp); + + if (a < b) { + if (b < c) + p = b; + else if (a < c) + p = c; + else + p = a; + } else { + if (a < c) + p = a; + else if (b < c) + p = c; + else + p = b; + } + + goto quicksort_divider (recvif, recvif.s, recvif.e, p, sp); +} +/* main routine end. */ + +/* divide routine. */ +__code quicksort_divider(QS_IF recvif, int s, int e, int p, stack sp) +{ + goto quicksort_divider_s(recvif, s, e, p, sp); +} +__code quicksort_divider_s(QS_IF recvif, int s, int e, int p, stack sp) +{ + if (recvif.v[s]ret = quicksort_start; + fp->size = sizeof(frame); + fp->interface.v = recvif.v; + fp->interface.s = e+1; + fp->interface.e = recvif.e; + + /* recvif is used by second quicksort_start. */ + recvif.e = e; + goto quicksort_start(recvif, sp); +} +/* recursive call routine end. */ + +__code +quicksort(int *v, int s, int e, RETTYPE ret, void *arg ) +{ + framep fp; + stack sp0, sp; + sp0 = malloc(STACK_SIZE); + printf("allocate a stack %p\n", sp0); + sp = sp0 + STACK_SIZE; + QS_FINISH *finish_if; + + /* interface for quicksort_finish. */ + finish_if = (sp -= sizeof(*finish_if)); + finish_if->ret = ret; + finish_if->ret_arg = arg; + finish_if->sp = sp0; + + /* interface for quicksort_start. */ + /* frame for quicksort_finish. */ + fp = (sp -= sizeof(frame)); + fp->ret = quicksort_finish; + fp->size = sizeof(frame); + fp->interface.v = v; + fp->interface.s = s; + fp->interface.e = e; + + goto quicksort_start(fp->interface, sp); +} +__code +quicksort_finish(QS_IF recvif, stack sp) +{ + QS_FINISH *interface = (QS_FINISH*)sp; + free(interface->sp); + printf("free the stack %p\n", interface->sp); + goto interface->ret(interface->ret_arg); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/quicksort/quicksort_test.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/quicksort/quicksort_test.cbc Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,106 @@ +#include +#include +#include +#include + +#include"quicksort_test.h" + +extern __code quicksort(int *,int,int, __code (*)(void*), void*); + + +void +random_initialize(int *v, int size, int min, int max) +{ + int i; + int diff = max-min+1; + + for (i=0; i v[i+1]) + return 0; + } + return 1; +} + +__code +exit0(void *arg) +{ + int *v = arg; + int b; + //print_array(arg, size); + b = check_sort(arg, size); + if (b) { + printf("sorting successful!\n"); + exit(EXIT_SUCCESS); + } else { + printf("sorting failure! \n"); + exit(EXIT_FAILURE); + } +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/return_check/test_return.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/return_check/test_return.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,89 @@ +#include + +#if 0 +typedef float testtype; +testtype good = 33.3f; +testtype bad = 0.0f; +void print_testtype(testtype t) +{ + printf("return value = %2.3f good=%2.3f,bad=%2.3f\n", t,good,bad); +} +#elif 1 +typedef char testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#elif 0 +typedef double testtype; +testtype good = 333.3; +testtype bad = 0.00; +void print_testtype(testtype t) +{ + printf("return value = %3.3lf, good=%3.3lf,bad=%3.3lf\n", t,good,bad); +} +#elif 0 +typedef +struct { + int a; + float b; + int c[4]; +} testtype; +testtype good = {33, 33.3, {4,4,4,4}}; +testtype bad = {0, 00.0, {0,0,0,0}}; +void print_testtype(testtype t) +{ + printf( "return value = {\n" + " a = %d\n" + " b = %2.3f\n" + " c = { %d, %d, %d, %d }" + "}\n", t.a, t.b, + t.c[0],t.c[1],t.c[2],t.c[3]); +} +#else +typedef int testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#endif + +typedef void (*RET_FUNC)(testtype, void *); + +void g(RET_FUNC func) +{ + func(good, NULL); +} + +testtype f_cbc() +{ + //__label__ _cbc_exit0; + //int retval; + void *ret; + + ret = _CbC_return; + + printf("f0: fp = %p\n", __builtin_frame_address(0)); + printf("__return_func = %p\n", ret); + g(ret); + + printf("not good\n"); + return bad; +//_cbc_exit0: + //printf("f1: fp = 0x%x\n", __builtin_frame_address(0)); + //return retval; +} + +int main(int argc, char **argv) +{ + testtype t; + printf("main before: fp = %p\n", __builtin_frame_address(0)); + t = f_cbc(); + print_testtype(t); + printf("main after: fp = %p\n", __builtin_frame_address(0)); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/return_check/typedeffed.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/return_check/typedeffed.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,89 @@ +#include + +#if 0 +typedef float testtype; +testtype good = 33.3f; +testtype bad = 0.0f; +void print_testtype(testtype t) +{ + printf("return value = %2.3f good=%2.3f,bad=%2.3f\n", t,good,bad); +} +#elif 1 +typedef char testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#elif 0 +typedef double testtype; +testtype good = 333.3; +testtype bad = 0.00; +void print_testtype(testtype t) +{ + printf("return value = %3.3lf, good=%3.3lf,bad=%3.3lf\n", t,good,bad); +} +#elif 0 +typedef +struct { + int a; + float b; + int c[4]; +} testtype; +testtype good = {33, 33.3, {4,4,4,4}}; +testtype bad = {0, 00.0, {0,0,0,0}}; +void print_testtype(testtype t) +{ + printf( "return value = {\n" + " a = %d\n" + " b = %2.3f\n" + " c = { %d, %d, %d, %d }" + "}\n", t.a, t.b, + t.c[0],t.c[1],t.c[2],t.c[3]); +} +#else +typedef int testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#endif + +typedef void (*RET_FUNC)(testtype, void *); + +void g(RET_FUNC func) +{ + func(good, NULL); +} + +testtype f_cbc() +{ + //__label__ _cbc_exit0; + //int retval; + void *ret; + + ret = _CbC_return; + + printf("f0: fp = %p\n", __builtin_frame_address(0)); + printf("__return_func = %p\n", ret); + g(ret); + + printf("not good\n"); + return bad; +//_cbc_exit0: + //printf("f1: fp = 0x%x\n", __builtin_frame_address(0)); + //return retval; +} + +int main(int argc, char **argv) +{ + testtype t; + printf("main before: fp = %p\n", __builtin_frame_address(0)); + t = f_cbc(); + print_testtype(t); + printf("main after: fp = %p\n", __builtin_frame_address(0)); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/return_check/variable_return_type.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/return_check/variable_return_type.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,196 @@ +#include +#include + +#define dprint(f, args...) \ + fprintf(stdout, "in %s\t: "f, __FUNCTION__, ## args) + + +/* for integer. */ +int goodint = 33; +int badint = 0; +typedef void (*RETINT_FUNC)(int, void *); +void g_int(RETINT_FUNC func) +{ + func(goodint, NULL); +} +int f_int() +{ + void *ret; + + ret = _CbC_return; + + dprint("fp = %p\n", __builtin_frame_address(0)); + dprint("__return_func = %p\n", ret); + g_int(ret); + //goto g(ret); + + dprint("not good\n"); + return badint; +} + + +/* for double. */ +double gooddouble = 333.3; +double baddouble = 0.00; +typedef void (*RETDOUBLE_FUNC)(double, void *); +void g_double(RETDOUBLE_FUNC func) +{ + func(gooddouble, NULL); +} +double f_double() +{ + void *ret; + ret = _CbC_return; + + dprint("fp = %p\n", __builtin_frame_address(0)); + dprint("__return_func = %p\n", ret); + g_double(ret); + //goto g_double(ret); + + dprint("not good\n"); + return baddouble; +} + +/* for float. */ +float goodfloat = 33.3f; +float badfloat = 0.0f; +typedef void (*RETFLOAT_FUNC)(float, void *); +void g_float(RETFLOAT_FUNC func) +{ + func(goodfloat, NULL); +} +float f_float() +{ + void *ret; + ret = _CbC_return; + + dprint("fp = %p\n", __builtin_frame_address(0)); + dprint("__return_func = %p\n", ret); + g_float(ret); + //goto g_float(ret); + + dprint("not good\n"); + return badfloat; +} + +/* for char. */ +char goodchar = 33; +char badchar = 0; +typedef void (*RETCHAR_FUNC)(char, void *); +void g_char(RETCHAR_FUNC func) +{ + func(goodchar, NULL); +} +char f_char() +{ + void *ret; + + ret = _CbC_return; + + dprint("fp = %p\n", __builtin_frame_address(0)); + dprint("__return_func = %p\n", ret); + g_char(ret); + //goto g(ret); + + dprint("not good\n"); + return badchar; +} + + +/* for struct. */ +struct ifid { + int a; + float b; + int c[4]; + double d; +}; +struct ifid goodstruct = {33, 33.3, {4,4,4,4}, 333.333}; +struct ifid badstruct = {0, 00.0, {0,0,0,0}, 0.0}; +typedef void (*RETSTRUCT_FUNC)(struct ifid, void *); +void g_struct(RETSTRUCT_FUNC func) +{ + func(goodstruct, NULL); +} +struct ifid f_struct() +{ + void *ret; + + ret = _CbC_return; + + dprint("fp = %p\n", __builtin_frame_address(0)); + dprint("__return_func = %p\n", ret); + g_struct(ret); + //goto g(ret); + + dprint("not good\n"); + return badstruct; +} + +int main(int argc, char **argv) +{ + void *bptr; + int rint; + float rfloat; + double rdouble; + char rchar; + struct ifid rstruct; + + bptr = __builtin_frame_address(0); + + dprint("before int: fp = %p\n", __builtin_frame_address(0)); + rint = f_int(); + dprint("f_int = %d, good=%d,bad=%d\n", rint,goodint,badint); + + dprint("before float: fp = %p\n", __builtin_frame_address(0)); + rfloat = f_float(); + dprint("f_float = %3.3f, good=%3.3f,bad=%3.3f\n", rfloat,goodfloat,badfloat); + assert(bptr==__builtin_frame_address(0)); + + dprint("before double: fp = %p\n", __builtin_frame_address(0)); + rdouble = f_double(); + dprint("f_double = %3.3lf, good=%3.3lf,bad=%3.3lf\n", rdouble,gooddouble,baddouble); + assert(bptr==__builtin_frame_address(0)); + + dprint("before char: fp = %p\n", __builtin_frame_address(0)); + rchar = f_char(); + dprint("f_char = %d, good=%d,bad=%d\n", rchar,goodchar,badchar); + assert(bptr==__builtin_frame_address(0)); + + dprint("before struct: fp = %p\n", __builtin_frame_address(0)); + rstruct = f_struct(); + dprint( "return value = {\n" + " a = %d\n" + " b = %2.3f\n" + " c = { %d, %d, %d, %d }\n" + " d = %3.3f\n" + "}\n", rstruct.a, rstruct.b, + rstruct.c[0],rstruct.c[1],rstruct.c[2],rstruct.c[3], rstruct.d); + + + + dprint("end: fp = %p\n", __builtin_frame_address(0)); + + if (bptr!=__builtin_frame_address(0)) { + dprint("CbC_return failure!\n"); + return 1; + } + if ( rint!=goodint + || rchar!=goodchar + || (rfloat < goodfloat-0.01 || goodfloat+0.01 < rfloat) + || (rdouble < gooddouble-0.01 || gooddouble+0.01 < rdouble) + || rstruct.a!=goodstruct.a + || (rstruct.b < goodstruct.b-0.01 || goodstruct.b+0.01 < rstruct.b) + || (rstruct.d < goodstruct.d-0.01 || goodstruct.d+0.01 < rstruct.d) + || rstruct.c[0]!=goodstruct.c[0] + || rstruct.c[1]!=goodstruct.c[1] + || rstruct.c[2]!=goodstruct.c[2] + || rstruct.c[3]!=goodstruct.c[3] ) { + dprint("CbC_return failure!\n"); + return 1; + } + + + dprint("CbC_return successful!\n"); + return 0; +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/stack1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/stack1.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,126 @@ +/* + test for CbC converted __code from C + */ + +//#include +#define NULL 0 + +extern void *malloc(int); + +typedef void *stack; + +void *stack0; /* size of void* == 1 */ + +struct cont_save { /* General Return Continuation */ + __code (*ret)(); +}; + + __code g(int,void *); + __code f_g0(int ,int ,void *); + __code f_g1(int,void *); + __code print(int i,int j,__code (*exit1)(),void*exit1env); + +struct f_g0_save { /* Specialized Return Continuation */ + __code (*ret)(); + int ii,kk,jj; +}; + +__code g(int i,void *sp) { + goto (* ((struct cont_save *)sp)->ret)(i+4,sp); +} + +__code __attribute__ ((fastcall)) f_g1(int j,void *sp) { /* Continuation */ + int k; + struct f_g0_save *c; + + c = sp; + k = c->kk; + sp += sizeof(struct f_g0_save); + goto (* ((struct cont_save *)sp)->ret)(k+4+j,sp); +} + +__code f(int i,void *sp) { + int k,j; + struct f_g0_save *c; +printf("#0042:f 0 sp: %x\n",sp-stack0); + + k = 3+i; + +printf("#0046:f 1 sp: %x\n",sp-stack0); + sp -= sizeof(struct f_g0_save); +printf("#0048:f 2 sp: %x\n",sp-stack0); + c = sp; + c->kk = k; + c->ii = i; + c->jj = j; + c->ret = f_g1; + goto g(i,sp); +} + + + +struct f0_save { /* Specialized Return Continuation */ + __code (*ret)(); + __code (*exit1)(); + void *exit1env; + int jj; +}; + +__code f1(int i,void *sp) ; +__code f0(int i,int j,__code(*exit2)(), void *exit2env,void *sp) +{ + struct f0_save *c; + printf("#0070:f0 1 sp: %x\n",sp-stack0); + sp -= sizeof(struct f0_save); + printf("#0072:f0 2 sp: %x\n",sp-stack0); + c = sp; + c->jj = j; + c->exit1 = exit2; + c->exit1env = exit2env; + c->ret = f1; + printf("#0078:f0 3 sp: %x\n",sp-stack0); + goto f(i,sp); +} + +__code f1(int i,void *sp) { + int j; + int *exit2env; + __code (*exit2)(); + struct f0_save *c; + + c = sp; + j = c->jj; + exit2 = c->exit1; + exit2env = c->exit1env; + + sp += sizeof(struct f0_save); + goto print(i,j,exit2,exit2env); +} + +int main(int ac, char*av[]){ + main0(ac,av); +} + +int main0( int ac, char *av[]) +{ + int i,j; + int *sp; + + // i = atoi(av[1]); + i = 1; + stack0 = ((char *)malloc(1024)+1024); + sp = stack0; + j = i; + + printf("#0108:sp: %x %x\n",sp-(int*)stack0,sizeof(*stack0)); + //goto f0(i,j,_CbC_return,_CbC_environment,sp); + goto f0(i,j,NULL,NULL,sp); +} + +__code print(int i,int j,__code (*exit1)(),void*exit1env) +{ + printf("#0114:%d %d\n",i,j); + //goto (*exit1)(0),exit1env; + exit(0); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test01.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test01.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,34 @@ +#include + +int test_code(void){ + printf("\t\ttest_code: return 10\n"); + return 10; +} + +int test_goto(int a){ + printf("\ttest_goto: a = %d\n", a); + //return test_code(); + return test_code(); +} + +int main(int argc, char **argv){ + int ret; + printf("test code\n"); + ret = test_goto(20); + printf("main: ret = %d\n", ret); + + return test_goto2(10,20,30,40,50,60,70,80,90,100); + return 0; +} + +int test_code2(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k){ + printf("\t\ttest_code: return 10\n"); + printf("a=%d,b=%d,c=%d,d=%d,e=%d,f=%d,g=%d,h=%d,i=%d,j=%d,k=%d\n",a,b,c,d,e,f,g,h,i,j,k ); + return a+b+c+d+e+f+g+h+i+j+k; +} + +int test_goto2(int a,int b,int c,int d,int e,int f,int g,int h,int i,int j,int k){ + printf("\ttest_goto: a = %d\n", a); + //return test_code(); + return test_code2(a,b,c,d,e,f,g,h,i,j,k); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test02.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test02.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,22 @@ +#include + +__code test_code(void){ + printf("\t\ttest_code: return 10\n"); + return; +} + +__code test_goto(int a){ + printf("\ttest_goto: a = %d\n", a); + //return test_code(); + goto test_code(); +} + +int main(int argc, char **argv){ + int ret=0; + printf("test code\n"); + test_goto(20); + printf("main: ret = %d\n", ret); + + return 0; +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test03.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test03.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,26 @@ + +extern void test02() ; +extern void test03() ; + +extern int data; + +extern void +test01() { + test02(); +} + +extern void +test02() { + test03(); +} + +extern void +test03() { + data = 3; +} + +int +main() +{ + test01(); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test04.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test04.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,33 @@ + +int test01(int a, double b, int *c){ + return a+b- *c; +} + +int test(int *a, double b){ + int c; + c = *a*b + 10; + printf("a = %x, *a = %d, b = %d\n", a, *a, b); + *a = test01( *a+b, 0.02, &c); + return *a+b; +} + + +int test02(int a, int b){ + int i,sum=0; + i = a; + while ( i <= b ) { + sum += i; + i++; + } + return sum - a*b; +} + +int main(int argc, char **argv){ + int a=10; + + printf("= %d\n", test02(0, 10)); + test( &a, 10.1); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test05.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test05.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,58 @@ +//#include +#define dprint(f, args...) \ + printf("in %s: "f, __FUNCTION__, ## args) + +__code caller (int a); +void f01 (int a); +void f02 (int a, float b); +__code cs01 (int a); +__code cs02 (int a, float b); +int main (); + + +int g=0; +void (*funcp)(int); +__code (*csp)(int); + +__code caller(int a) { + f01(a+2); + f02(a+3, 13.2); + funcp(a+4); + goto csp(a+4); + dprint("\n"); +} + +__code end() { + dprint("\n"); + exit(0); +} + +void f01(int a) { + dprint("%d\n", a); + g += a; + return ; +} +void f02(int a, float b) { + dprint("%d, %f\n", a, b); + g -= a; + g += b*0.3; + return ; +} +__code cs01(int a) { + dprint("%d\n", a); + g += a; + goto end() ; +} +__code cs02(int a, float b) { + dprint("%d, %f\n", a, b); + g -= a; + g += b*0.3; + goto end() ; +} + +int main() { + funcp = f01; + csp = cs01; + caller(10); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_array.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_array.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,17 @@ +//#include +void print_array(int *, int); + +int main(int argc, char **argv){ + int array[10] = {10, 2, 3, 0, 7, 5}; + array[1] += array[2]+array[4]; + print_array(array, 10); + return 0; +} + +void print_array(int *a, int size){ + while( size-->0 ){ + printf(" %7d", *a++); + } + printf("\n"); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_call.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_call.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,12 @@ + +int test(int a){ + printf("a = %d\n", a); + return 10*a; +} + +int main(){ + test(10); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_cs.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_cs.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,43 @@ +//#include +//#include + +__code cs_exit(int , double , char ); +__code cs1(int, int, int, int); +__code cs2(double, double, int, double); +void test_goto(void); + +int main(int argc, char **argv){ + printf("main start\n"); + //goto cs2(2.22, 3.33, 4, 5.55); + test_goto(); + return 0; +} + +void test_goto(){ + goto cs1(10, 20, 30, 40); +} + +__code cs1(int a, int b, int c, int d){ + printf("%4d, %4d, %4d, %4d\n", a, b, c, d); + a += 40, b += 40, c += 40, d += 40; + goto cs2((double)a, (double)b, c, (double)d); +} + +__code cs2(double a, double b, int c, double d){ + printf("%4d, %4d, %4d, %4d\n", (int)a, (int)b, (int)c, (int)d); + a += 40, b += 40, c += 40, d += 40; + goto cs_exit((int)a, b, (char)c); +} + +__code cs_exit(int a, double b, char c){ + printf("%4d, %4d, %4d\n", (int)a, (int)b, (int)c); + printf("cs_exit was called!\n"); + exit(0); +} + + +void caller(int a, double b){ + cs2(b,20.0,a, 40.4); + cs1(10,20,30, 40); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_csp1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_csp1.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,60 @@ +#include +#include + +//static __code (*csp)(int, int, int, int); + +__code cs_end (int a); +__code cs0 (int a, int b, int c, int d); +void* freturn (); +__code cs_goto (int a, int b, int c, int d); +int function (double a, float b, int c); +int main (int argc, char **argv); + + +__code cs_goto(int a, int b, int c, int d){ + __code (*csp)(int, int, int, int); + csp = freturn(); + printf("csp = %x.\n", csp); + + //printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g); + //printf("cs_goto : a=%d, b=%d, c=%d, d=%d.\n", a, b, c, d); + //printf("cs_goto : a-4=%d, a-8=%d, a-12=%d, a-16=%d.\n", *(&a-4), *(&a-8), *(&a-12), *(&a-16)); + //printf("cs_goto : cs0(a, b, c, d)\n"); +#ifdef INDIRECT + goto csp(b+a, d+b, a+c, c+d); +#else + goto cs0(b+a, d+b, a+c, c+d); +#endif +} + +__code cs_end(int a){ + printf("cs_exit : a=%d.\n", a); + exit(a); + goto cs_end(a); +} + +__code cs0(int a, int b, int c, int d){ + //printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g); + printf("cs_cs0 : a=%d, b=%d, c=%d, d=%d.\n", a, b, c, d); + goto cs_end( (int)(20*a + 30*b + 40*c + 50*d) ); +} + + +void* freturn(){ + return cs0; +} + +int function(double a, float b, int c){ + + printf("function:\n"); + printf("a=%lf, b=%f, c=%d\n", a, b, c); + //goto cs_goto(10, 20, 30, 40); + goto cs_goto(10, 20, 30, 40); +} + +int main(int argc, char **argv){ + //csp = cs0; + function(10.01, 20.02, 30); + return 0; +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_env.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_env.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,68 @@ + +typedef void (*RET_FUNC)(int, void *); + +int main(int argc, char **argv) +{ + int r; + r = f(); + printf("%d\n", r); +} + +//void z(RET_FUNC ret, void *fp) +__code z(RET_FUNC ret, void *fp) +{ + printf("z: fp=0x%x\n", __builtin_frame_address(0)); + ret(5, fp); +} +__code i(RET_FUNC ret, void *fp) +{ + printf("i: fp=0x%x\n", __builtin_frame_address(0)); + goto z(ret, fp); +} +__code h(RET_FUNC ret, void *fp) +{ + printf("h: fp=0x%x\n", __builtin_frame_address(0)); + goto i(ret, fp); +} +__code g(RET_FUNC ret, void *fp) +{ + printf("g: fp=0x%x\n", __builtin_frame_address(0)); + goto h(ret, fp); +} + +int f() +{ + __label__ exit0; + int retval; + //void (*ret)(int retval_, void *fp); + + /* + ret = ({ + void __return_func(int retval_, void *fp){ + retval = retval_; + goto exit0; + } + __return_func; + }); + */ + printf("f0: fp = 0x%x\n", __builtin_frame_address(0)); + void __return_func(int retval_, void *fp){ + retval = retval_; + goto exit0; + } + //ret = __return_func; + + printf("f1: fp = 0x%x\n", __builtin_frame_address(0)); + + //g(__return_func, __builtin_frame_address(0)); + goto g(__return_func, __builtin_frame_address(0)); + + printf("bad\n"); + +exit0: + printf("f2: fp = 0x%x\n", __builtin_frame_address(0)); + return retval; +} + + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_func2code.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_func2code.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,43 @@ +#include +#include + +#define DEBUG 1 +#ifdef DEBUG + #define log(f, args...) \ + fprintf(stderr, "in %s: "f, __FUNCTION__, ## args) +#else + #define log(f, args...) ; +#endif + +__code +exitter(int a) +{ + exit(0); +} + +__code +cs0(int x, int y) +{ + log("x = %d, y = %d.\n", x, y); + log("will exit with code %d.\n", x*y); + goto exitter(x*y); +} + +void +continuation(int a) +{ + log("go code segment cs0\n"); + goto cs0(a, a*20); + log("Error: continuation reachs bad region.\n"); +} + +int +main(int argc, char **argv) +{ + int a; + if (argc>2) { + a = atoi(argv[1]); + } + + continuation(20); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_nest.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_nest.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,50 @@ + +int printf(char *, ...); +typedef void (*RET_FUNC)(int, void *); + +void g(RET_FUNC func) +{ + func(33, 0); +} + +int f() +{ + void *ret; + ret = ({ + __label__ exit0; + int retval; + void __return_func(int retval_, void *fp){ + retval = retval_; + goto exit0; + } + if (0) { + exit0: + printf("f2: fp = 0x%x\n", __builtin_frame_address(0)); + return retval; + } + __return_func; + }); + + //g(__return_func, __builtin_frame_address(0)); + printf("f0: fp = 0x%x\n", __builtin_frame_address(0)); + printf("__return_func = %x\n", ret); + g(ret); + + printf("not good\n"); + return 0; + +//exit0: + //printf("f2: fp = 0x%x\n", __builtin_frame_address(0)); + //return retval; +} + +int main(int argc, char **argv) +{ + int t; + printf("main before: fp = 0x%x\n", __builtin_frame_address(0)); + t = f(); + printf("f = %d\n", t); + printf("main after: fp = 0x%x\n", __builtin_frame_address(0)); +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_para.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_para.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,26 @@ +#include +#include + +__code cs_exit(int a){ + printf("cs_exit was called: a=%d.\n", a); + exit(a); +} + +__code cs0(int a, double b, int c, int d){ + printf("cs0 was called: a=%d, b=%lf, c=%d, d=%d.\n", a, b, c, d); + goto cs_exit( (int)(20*a + 4.4*b + 2022/c + 28*d) ); +} + + +__code cs_goto(){ + goto cs0(11, 22.2, 33, 44); +} + +int main(int argc, char **argv){ + + printf("it is in main.\n"); + goto cs_goto(); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_para2.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_para2.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,40 @@ +#include +#include + +__code cs_end(int a){ + printf("cs_exit : a=%d.\n", a); + exit(a); +} + +__code cs0(int a, int b, int c, int d); + +__code cs_goto(int a, int b, int c, int d){ + //printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g); + printf("cs_goto : a=%d, b=%d, c=%d, d=%d.\n", a, b, c, d); + //printf("cs_goto : a-4=%d, a-8=%d, a-12=%d, a-16=%d.\n", *(&a-4), *(&a-8), *(&a-12), *(&a-16)); + //printf("cs_goto : cs0(a, b, c, d)\n"); + goto cs0(b, c, d, a); +} + +__code cs0(int a, int b, int c, int d){ + //printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g); + printf("cs_cs0 : a=%d, b=%d, c=%d, d=%d.\n", a, b, c, d); + goto cs_end( (int)(20*a + 30*b + 40*c + 50*d) ); +} + + +int function(double a, float b, int c){ + + //printf("function:\n"); + //printf("a=%lf, b=%f, c=%d\n", a, b, c); + //goto cs_goto(10, 20, 30, 40); + goto cs_goto(10, 20, 30, 40); +} + +int main(int argc, char **argv){ + + function(10.01, 20.02, 30); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_para3.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_para3.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,83 @@ +#include +#include + +struct abc { + int a; + double b; + char c; + double *d; +}; + +struct def { + int d; + struct abc e; + struct abc *f; +}; + +void print_abc(struct abc a){ + printf("\tstruct abc:\n"); + printf("\ta=%d, b=%lf, c=%d, d=%p\n", a.a, a.b, a.c, a.d); +} +void print_def(struct def b){ + printf("\tstruct def:\n"); + printf("\td=%d, f=%p\n", b.d, b.f); + print_abc(b.e); +} + +__code cs_exit(int a){ + printf("cs_exit : a=%d.\n", a); + exit(a); +} + +__code cs0(struct abc a, struct def b, int c){ + printf("cs0 :\n"); + printf("c=%d\n", c); + print_abc(a); + print_def(b); + goto cs_exit( c*a.a+b.e.c ); +} + + +__code cs_goto(int c, struct abc a, struct def b){ + printf("cs_goto :\n"); + printf("c=%d\n", c); + print_abc(a); + print_def(b); + goto cs0(a, b, c); +} + +int function(){ + struct abc A; + struct def B; + A.a = 10, A.b = 20.02, A.c = '\0', A.d = 0xad; + B.d = 30, B.f = 0xbf; + B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = 0xed; + + printf("function :\n"); + print_abc(A); + print_def(B); + //printf("20*%d + 30*%d + 40*%d + 50*%d =\n", a, b, c, d); + goto cs_goto(100, A, B); + return 0; +} + +int main(int argc, char **argv){ + struct abc A; + struct def B; + //int a=10, b=20, c=30, d=40, e=50, f=60, g=70; + A.a = 10, A.b = 20.02, A.c = '\0', A.d = 0xad; + B.d = 30, B.f = 0xbf; + B.e.a = 50, B.e.b = 60.06, B.e.c = '\1', B.e.d = 0xed; + + /* + printf("main :\n"); + print_abc(A); + print_def(B); + //printf("20*%d + 30*%d + 40*%d + 50*%d =\n", a, b, c, d); + goto cs_goto(100, A, B); + */ + function(); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_para4.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_para4.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,74 @@ +//#include +//#include + +#define DPRINT 1 +#define NOINLINE __attribute__((noinline)) + +extern __code cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, + int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); +extern __code cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, + int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); + +__code (*csp)(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, + int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); + +__code NOINLINE cs_exit(int a){ + int b = 20 * a + 3; + printf("cs_exit : a=%d. b=%d\n", a, b); + exit(a); +} + +__code NOINLINE cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, + int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){ +#if DPRINT + //printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g); + printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a, b, c, d, e, f, g, h, i, j); + printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); +#endif + goto cs_exit( (int)(10*a + 10*b + 10*i2 + 10*j2) ); +} + +__code NOINLINE cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, + int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){ +#if DPRINT + printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a, b, c, d, e, f, g, h, i, j); + printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); +#endif + goto cs0(b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, a); +} + +int function(double l, float m, int n){ + int a=10, b=20, c=30, d=40, e=50, f=60, g=70, h=80, i=90, j=100; + int a2=110, b2=120, c2=130, d2=140, e2=150, f2=160, g2=170, h2=180, i2=190, j2=200; + +#if DPRINT + printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a, b, c, d, e, f, g, h, i, j); + printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); + //printf("l=%lf, m=%f, n=%d\n", l, m, n); +#endif + //goto cs_goto(10, 20, 30, 40); + goto cs_goto(a, b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); +} + + +int main(int argc, char **argv){ + + //printf("main :\n"); + /* + printf("main : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a, b, c, d, e, f, g, h, i, j); + printf("main : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", + a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); + */ + //csp = cs0; + function(10.01, 20.02, 30); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_return.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_return.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,89 @@ +#include + +#if 0 +typedef float testtype; +testtype good = 33.3f; +testtype bad = 0.0f; +void print_testtype(testtype t) +{ + printf("return value = %2.3f good=%2.3f,bad=%2.3f\n", t,good,bad); +} +#elif 1 +typedef char testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#elif 0 +typedef double testtype; +testtype good = 333.3; +testtype bad = 0.00; +void print_testtype(testtype t) +{ + printf("return value = %3.3lf, good=%3.3lf,bad=%3.3lf\n", t,good,bad); +} +#elif 0 +typedef +struct { + int a; + float b; + int c[4]; +} testtype; +testtype good = {33, 33.3, {4,4,4,4}}; +testtype bad = {0, 00.0, {0,0,0,0}}; +void print_testtype(testtype t) +{ + printf( "return value = {\n" + " a = %d\n" + " b = %2.3f\n" + " c = { %d, %d, %d, %d }" + "}\n", t.a, t.b, + t.c[0],t.c[1],t.c[2],t.c[3]); +} +#else +typedef int testtype; +testtype good = 33; +testtype bad = 0; +void print_testtype(testtype t) +{ + printf("return value = %d, good=%d,bad=%d\n", t,good,bad); +} +#endif + +typedef void (*RET_FUNC)(testtype, void *); + +void g(RET_FUNC func) +{ + func(good, NULL); +} + +testtype f_cbc() +{ + //__label__ _cbc_exit0; + //int retval; + void *ret; + + ret = _CbC_return; + + printf("f0: fp = %p\n", __builtin_frame_address(0)); + printf("__return_func = %p\n", ret); + g(ret); + + printf("not good\n"); + return bad; +//_cbc_exit0: + //printf("f1: fp = 0x%x\n", __builtin_frame_address(0)); + //return retval; +} + +int main(int argc, char **argv) +{ + testtype t; + printf("main before: fp = %p\n", __builtin_frame_address(0)); + t = f_cbc(); + print_testtype(t); + printf("main after: fp = %p\n", __builtin_frame_address(0)); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_struct.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_struct.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,31 @@ + +struct aaa{ + int a; // 4 + char b; // 1 + int c; // 4 + double d; // 8 + char e[10]; //10 +}; //27 --> 32 + +int main(int argc, char **argv){ + struct aaa A; + A.a = 10; + A.b = 'A'; + A.c = 20; + A.d = 1.11; + A.e[0] = 'A', A.e[1] = 'Z'; + + printf("sizeof aaa = %d\n", sizeof(struct aaa)); + tset01( A, 10); + return 0; +} + +void tset01( struct aaa B, int size){ + printf("B.a = %d\n", B.a); + printf("B.b = %d\n", B.b); + printf("B.c = %d\n", B.c); + printf("B.d = %lf\n", B.d); + B.e[9] = '\0'; + printf("B.e = %s\n", B.e); + printf("size = %d\n", size); +} diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_tailcall1.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_tailcall1.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,28 @@ +#include + + +void B(int a, int b, int c){ + printf("B: a=%d, b=%d, c=%d\n", a, b, c); + return ; +} + +void* freturn(){ + return B; +} +void A(int a, int b, int c, int d){ + void (*fp)(int, int, int); + fp = freturn(); + + printf("A: a=%d, b=%d, c=%d, d=%d\n", a, b, c, d); + return fp(a, b, c+d); + //return B(a, b, c+d); +} + +int main(int argc, char **argv){ + printf("main: \n"); + //fp = B; + A(10, 20, 30, 40); + return 0; +} + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-examples/test_tree.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-examples/test_tree.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,54 @@ +//#include +double test(char, char, int, double); +__code cs(int , double , char ); +void testvoid(double a); +int testint(double a); + +__code cs(int a, double b, char c){ + printf("__code cs was called.\n"); + printf("a = %d, b = %lf, c = %d\n", a, b, c); + exit(0); +} +__code cs1(int a, double b, char c, int d){ + printf("__code cs1 was called.\n"); + printf("a = %d, b = %lf, c = %d, d = %d\n", a, b, c, d); + exit(0); +} + +int main(int argc, char **argv){ + double t; + //goto cs(2, 10.2, 2); + + t = test('a', 'b', 10, 2.5); + printf("t = %lf\n", t); + testvoid(2.22); + testint(2.22); + + printf("test_goto\n"); + goto test_goto1(10, 20, 30.3); + return 0; +} +void test0(){ + exit(0); +} + +void testvoid(double a){ + return ; +} +int testint(double a){ + int b; + b = (a*100-a) +2; + return 1; +} + +double test(char c, char l, int a, double d){ + return (double)a*d+c+l; +} + +void test_goto(int a, int b, double c){ + goto cs(2, 10.2, 3); +} +__code test_goto1(int a, int b, double c){ + goto cs1(2, 10.2, 3, 4); +} + diff -r c156f1bd5cd9 -r d0e37615691e CbC-implemantation.ja --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-implemantation.ja Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,207 @@ + + + GCC への CbC コンパイル機能の実装について + + +___________________________________________________________ + Code Segmentの実装 +----------------------------------------------------------- + +Code SegmentをC言語に組み込む。 +コンパイラとしては単なるvoidの関数として扱い、parse treeにcode +segmentであることのフラグを追加する。 + + * 予約語''__code``の追加 + c-common.cで定義されているc_common_reswords配列に追加 + { "__code", RID_CbC_CODE, 0} # D_CONLYも入れるか? + + * treeの生成関数 + 関数の型を表すtreeはbuild_funciton_type関数で生成されるが、code + segmentではこれを使えない。build_function_typeはhash管理でまったく同 + じ引数型、返り値型を持つものは同じオブジェクトを使うから。 + なのでbuild_code_segment_typeでこの代わりを行う。 + # 本当はbuild_function_typeのhashにcbcフラグも含める方がいいかもし + # れない。 + この関数は主にgrokdeclaratorから呼ばれる + + * cbc_set_codesegment関数 + Undocumented. + でも今は意味なかったような… + + + +___________________________________________________________ + goto文の実装 +----------------------------------------------------------- + +CbCについて重要な構文''goto cs(a, b, c);``を実装する。 +c-parser.c内の c_parser_statement_after_labels()関数における巨大なスイ +ッチ文のcase RID_GOTOのコードを修正する。 + + * アイデア + 全てのgoto文を単なる関数呼び出しとその後のリターン文と解釈することで + tail callを可能にする。 + 次のgoto文は + goto cs(a); + このparse treeでもこの様に解釈される + cs(a); + return; + + * Parser側での修正 + + オリジナルC言語のパース方法 + 1. gotoに続くトークンがCPP_NAME + 通常のgoto文として処理 + 2. gotoに続くトークンが'*` + computed gotoとして処理 + see "GCC Manual" Sec 6.3. (not internals Manual) + これを以下の様に変更する + + CbCでのパース方法 + 1. gotoに続くトークンがCPP_NAME && CPP_NAMEに次ぐトークンが';` + 通常のgoto文として処理 + 2. gotoに続くトークンが'*` + computed gotoとして処理 + 3. それ以外 + CbCのgotoとして処理 + + 処理内容 + 1. gotoトークンに続く文を関数呼び出しとみて + c_parser_expr_no_commas()関数を使ってパース、treeを取得 + # これで(*csp)(a)などにも対応できる + 2. 取得したtreeがCALL_EXPRでなければエラー + 3. treeにCbC_GOTOのフラグを立てる + 4. treeにTAILCALLのフラグを立てる + 5. add_stmt + 6. return文のtreeを生成 + + * RTL expansion + + 通常のCALL_EXPRを解析するexpand_callを一部修正する。この関数の途中か + らでexpand_cbc_goto関数に切り替えてRTLの生成はそこで全てを請け負う。 + 本来expand_callではtreeにsibcallフラグが立っていても、生成の過程で不 + 可能と検知するとsibcallを中断して通常のcallになるが、cbc_expand_call + では無理やりsibcallにする。 + + expand_callでの修正内容 + Undocumented. + expand_cbc_gotoの処理内容 + Undocumented. + +___________________________________________________________ + goto文における並列代入の実装 Nov 26, 2009 +----------------------------------------------------------- + +c-parser.c: c_parser_statement_after_labels()における goto文のパースの +段階で全ての引数を一時変数に代入する形に変更する。 +もちろんこれだけで並列代入ができる分けではないが、おそらくGCCの最適化 +機構でできると考える。 + + 1. c_parser_expr_no_commasでCALL_EXPRを取得 + 2. 全ての引数に対して一時変数を作成 + 3. それぞれを代入 + 4. CALL_EXPRの引数を一時変数に置き換え + 2-4の処理をcbc_replace_argumentsで行う。 + + + +___________________________________________________________ + return擬似変数の実装 +----------------------------------------------------------- + +___________________________________________________________ + environmentの実装 +----------------------------------------------------------- + + + + + + + + + + + + + + + + + +___________________________________________ + * goto文における並列代入実装について考える +------------------------------------------- + +Nov 26, 2009 +c-parser.c: c_parser_statement_after_labels()における goto文のパースの +段階で全ての引数を一時変数に代入する形に変更する。 +もちろんこれだけで並列代入ができる分けではないが、おそらくGCCの最適化 +機構でできると考える。 + + 1. c_parser_expr_no_commasでCALL_EXPRを取得 + 2. 全ての引数に対して一時変数を作成 build_decl? + 名前なしでできるか? + 3. それぞれを代入 + 4. CALL_EXPRの引数を一時変数に置き換え + 5. expand_callでの実装を元に戻す? + 現状のままでも動きはするはず +引数のタイプ + 関数 + o ADDR_EXPR + o PARM_DECL, VAR_DECL, + other + o *_EXPR + o PARM_DECL, VAR_DECL, + +実装の準備 + o CALL_EXPRから引数リストを取得 + DECL_ARGUMENTS(fundecl) + tree args = DECL_ARGUMENTS (fndecl); + for (; args; args = TREE_CHAIN (args)) + { + tree type = TREE_TYPE (args); + if (INTEGRAL_TYPE_P (type) + && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node)) + DECL_ARG_TYPE (args) = integer_type_node; + } + o 名前なしの変数作成 + var = build_decl(VAR_DECL, NULL_TREE, TYPE); + DECL_ARTIFICIAL (val) = 1; + o 代入文 + build_modify_expr (loc, TO_EXPR, NOP_EXPR, FROM_EXPR) + o Constantなら一時変数いらない + もしくはcallerの引数と同じ場合にのみ一時変数を使うか + o CALL_EXPRは取得後に引数を変えても大丈夫なのか? + o expand_callでのstore_one_arg, check_sibcall_argument_overlapの動作 + +実装に邪魔ないくつかの関数の解析 + o mem_overlaps_already_clobbered_arg_p(addr, size) + 指定したメモリ[addr,addr+size]範囲がすでに前の引数格納によって上書 + きされていないかをチェックする。 + 引数範囲を1byte毎にbitmapの1bitに表し、上書きされた場所は1がセット + されている。それにかぶるとNG. + また、addrが動的(esp+eaxなど)ならNG. + o sotre_one_args() +この実装ではexpand_cbc_gotoをいじらない事にした + + + + * DEBUG手法 + + gccコマンドではなくcc1コマンドに対してgdbを起動 + $ ls + GCC/ build-test/ test/ + $ cd test + $ gdb ../build-test/gcc/cc1 + + treeの表示 + (gdb) p browse_tree (exp) <== expはtree構造体 + + rtxの表示 + (gdb) p debug_rtx (exp) <== expはrtx構造体 + + browse_treeはtree, debug_rtxはrtxをconfigureの + --enable-checkingで指定している必要がある + + diff -r c156f1bd5cd9 -r d0e37615691e CbC-memo.ja --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-memo.ja Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,888 @@ +GCC + + + + +[[configureオプションの追加]] +$ cd gcc +$ vi configure.ac + ... +$ autoheader-2.59 # versionはconfigure.acの中に書いてある奴に合わせる +$ autoconf-2.59 +$ vi Makefile.in +これでconfigureスクリプトが完成するが、このautoconfはtarボールでは成功しない +svnリポジトリからチェックアウトしないと必要な関数が定義されてないのでエラーになる +なのでチェックアウトしたものでconfigureを生成したあと、それだけコピーしてこればOK +TOPディレクトリでは +$ autogen Makefile.def +$ autoconf-2.59 +ただしこれを使うことはないと思われる? + + +[[fastcall i386]] +1: %ecx +2: %edx +3: (%esp) +4: 4(%esp) +5: 8(%esp) + +__attribute__((noreturn)): 今のところこれでは問題が出ない +__attribute__((fastcall)): こっちはいろいろ問題あり + + +fastcallで起こる問題: +せっかく計算したebpが上書きされてしまっている +ecxに退避してそこにjmpすれば動く (これを直にかける?) +expand_cbc_gotoを直す必要がある +08048714 : +8048714: 53 push %ebx +8048715: 83 ec 28 sub $0x28,%esp +8048718: 89 4c 24 0c mov %ecx,0xc(%esp) +804871c: 8b 44 24 0c mov 0xc(%esp),%eax +8048720: 89 44 24 1c mov %eax,0x1c(%esp) +8048724: 8b 44 24 1c mov 0x1c(%esp),%eax +8048728: 8b 00 mov (%eax),%eax +804872a: 01 44 24 0c add %eax,0xc(%esp) +804872e: 8b 44 24 1c mov 0x1c(%esp),%eax +8048732: 8b 58 08 mov 0x8(%eax),%ebx +8048735: 8b 44 24 1c mov 0x1c(%esp),%eax +8048739: 8b 40 04 mov 0x4(%eax),%eax +804873c: 8b 54 24 0c mov 0xc(%esp),%edx +8048740: 89 c1 mov %eax,%ecx +8048742: 83 c4 28 add $0x28,%esp +8048745: 5b pop %ebx +8048746: ff e3 jmp *%ebx +これを手動で直すと-O0でも-O2でも動くことが確認できた + + + + + +**PROJECT CVS** +firefly.cr:~one/CVS_DB/CbC_Project/GCC + +-checkout + cvs co CbC_project/GCC +-commit + cvs commit +-import from 3rdparty source + tar xzvf gcc-xxx.tgz + cd gcc-xxx + cvs import -ko -m ".." CbC/project/GCC FSF_GCC REL_4_x_y +-merge + cd /temp + cvs checkout -jREL_4_2_1 -jREL_xxx CbC_project/GCC + もしくはすでに本流をcheckoutしているディレクトリで + cvs update -jREL_4_2_1 -jREL_4_2_2 でもできる? (4_2_2に移行時はこれをしたけど...まだ分かんない ) + cvs update -jREL_4_2_2 -jREL_4_2_3 + + +コンパイル時に実行されるプログラムは主に3つ +省略すると +cc1, as, collect2 +/usr/libexec/gcc/i386/redhat-linux/4.1.1/cc1 test.c -o test.s +as -o test.o test.s +/usr/libexec/gcc/i386/redhat/linux/4.1.1/collect2 ..... test.o + +cc1とcollect2は +gcc-core-4.2.0/gcc/内でコンパイルされるもの。 +必要なのはcc1だ。 + + + +CbCの実装 + tail callを使う。 + +tail call +関数の末尾呼び出しを最適化して、callでなくjmpで関数に飛ぶようになる。 +gcc -O1 -foptimize-sibling-calls か +gcc -O2 でコンパイルすればこの最適化が行われる。 + +最適化条件? (構造体未確認) +(推測!!) + 返り値が同じ + 呼ばれる関数の引数サイズが呼び出し側関数の引数サイズより小さい + +expand_gimple_basic_blockでstatement毎にRTLに変換されているが、 +ほとんどのstmtはexpand_expr_stmtに送られるけど、 +tail call の場合は expand_gimple_tailcallに直接送られる + + +**TEST BUILD** +mkdir build-test +cd build-test +../GCC/configure --disable-nls --disable-bootstrap --enable-languages=c --prefix=$PWD/installed --enable-checking=tree,rtl,assert +デバグのため、下の(a)を実行 +make +make install # これまでしないと処理系によってはerrorがいくつか... + +(a). 全てのMakefileの-O2 を -O0 に変更 viで :%s/-O2/-O0/gってとこか? + どうやら --prefix=...って、ちゃんとしないといけない? + stdio.hをインクルードしてるとエラーが出る。 + これはオレが失敗したのか?それともconfigureが悪いのか? + +$ CFLAGS="-O0 -gdwarf-2 -g3" ../GCC/configure ... + + +stdio.hをインクルードしたらerrorが出る問題 +firefly: --prefix=$PWD/USR-LOCALあり、別ディレクトリ + preinstall: NG postinstall: OK installed: OK +firefly: --prefixなし、別ディレクトリ + preinstall: NG postinstall: ?? +firefly: --prefixあり、同ディレクトリ + preinstall: NG postinstall: OK installed: OK +firefly(nativePkg): --prefixなし、別ディレクトリ + preinstall: NG + +chani: --prefix=$PWD/installedあり、同ディレクトリ + preinstall: OK +chani(nativePkg): --prefixなし、別ディレクトリ + preinstall: OK + + + +$PWD/installed/bin/gcc -O2 .... +$PWD/installed/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1 -O2 test01.c +browse_tree (tree) +debug_rtx(rtl) + + + +**GCC DEBUG** +gdb $BUILD-TEST/installed/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1 +プログラム内で +p browse_tree (current_function_decl) + + + + + +cc1 +main.c, toplev.c, + +main() in main.c + +toplev_main() in toplev.c + general_init(argv[0]) + signal設定 + init_gcc() + decode_options(argc, argv) + randomize() + do_compile() in toplev.c + timevar_start(TV_TOTAL) + process_options() + compile_file() + +struct lang_hooks lang_hooks +この構造体にパーサ等の関数ポインタが含まれている。 +これはlanghooks-def.hでLANG_HOOKS_INITIALIZERが定義されているが、 +言語ごとの定義はcならc-objc-common.hで、各メンバの定義が入れ替えられる。 + +options +decode_options -O?などのオプションを処理 + handle_options その他のオプションを順番に走査 + コンパイル対象のファイル名を main_input_filenameに入れる + -で始まる引数があればhandle_optionを呼ぶ + handle_option オプションを処理する + + +compile_file() + lang_hooks.parse_file() == c_common_parse_file + c_parse_file() in c-parser.c Parse a single source file. + c_parser_translation_unit() in c-parser.c + c_parser_external_declaration() + + +c_parser_external_declaration() in c-parser.c +CPPのtokenはここで処理して通常のはc_parser_declaration_or_fndefに渡す + +全体を通して、c_parser *parserという変数が関数の第一引数に渡される。 +これがファイルをparseする際の状態を保持しているっぽい + +c_parser_declaration_or_fndef() +こいつがglobalな関数、変数の宣言を処理する。 + c_parser_declspecs() 基本type (int, char, strcut...) + declspecs_add_scspec(specs, tree) extern,inline,staticなどのstorageをspecsにおさめる(specsのフラグをたてる) + declspecs_add_type(specs, c_typespec t) int, char, longなど第2引数が型名、第1引数にそれを格納 + finish_declspecs() Complexやunsignedなどの後に来る型名の処理? + shadow_tag(specs) 名前無しのstructやunionを処理。 + c_parser_declarator() 名前の前の*の処理 + c_parser_direct_declarator() idを取得 + c_parser_direct_declarator_inner() idの後の[]や()をパース + c_parser_parms_declarator() 引数リストもしくはidリスト(これはoldSTYLEのため) + c_parser_parms_list_declarator() + c_parser_parameter_declaration() + 通常の変数なら + start_decl() + start_init() c_parser_initializer() finish_init() + finish_decl() + + 関数パラメータ + start_function() 関数のdeclaration treeを作成する + treeはcurrent_function_declに保存 + old-styleパラメータ(while c_parser_declaration_or_fndef(parser, f, f, t, f) + fnbody = c_parser_compound_statement(parser) 関数本体の定義 + add_stmt(fnbody) fnbodyを専用のstatement listに追加する gimplifyに使われる? + finish_function() + current_function_declからfndeclを取得 + ...(fndecl) = pop_stmt_list(....(fndecl)) statement listからbodyを取得しfndeclにつなげる + c_genericize(fndecl) convert LD-tree to LI-tree + c_gimple_diagnostics_recursively(fndecl) + cgraph_finalize_function(fndecl,false) ファイルにアセンブラを出力? + cgraph_assemble_pending_functions() in cgraphunit.c + +関数とcode segment +code segmentはパース中の型はcts_CbC_codeとしてdeclspecsに保持している +finish_declspecsにおいて、treeを構成する際に型をvoid_type_nodeで格納 +このvoid_typeになんらかのフラグをつける?それともfunction_typeにつける? + + + +IDの取得 +c_parser_declarator() 名前の前の*の処理 + c_parser_direct_declarator() id or (.id)をパース + c_parser_direct_declarator_inner() idの後の[]や()をパース fnTreeを生成 + c_parser_parms_declarator() 型なしidリスト(これはoldSTYLEのため) + c_parser_parms_list_declarator() 型付き引数リストのパース 可変長かもみる + c_parser_parameter_declaration() + build_function_declarator() パースした引数とdelcで関数の宣言をつくる + c_declarator->u.arg_infoに引数を保持 + + +**expand_* treeをパースしてRTLを出力する +tree_expand_cfg() + expand_used_vars() + expand_function_start(current_function_decl) + cfunの値を設定して行く + assign_parms() + ここでcfun->args_sizeが設定されている + expand_gimple_basic_block() in for-loop + expand_expr_stmt() in stmt.c + expand_expr() in expr.h + expand_expr_real() expr.c + expand_expr_real_1() + +expand_expr_real_1() expr.c:8210 + expand_mult() expmed.c + expand_binop() optabs.c + GEN_FCN (icode) (temp, xop0, xop1); + 下の感じのRTLが返される + (set (reg:DF 67) (mult:DF (reg:DF 66) (reg/v:DF 64 [ d ]))) + が、この関数が返すのは (reg:DF 67)だけ + emit_insn(rtx) + RTLをDL-listに追加する. rtxはinsnでなければinsnでラッピングされる + + +**PASS LIST** +関数ごとに出力する場合、 +cgraph_assemble_pending_functions() flag_unit_at_a_timeが真なら実行 + cgraph_expand_function() + tree_rest_of_compilation + execute_pass_list + +まとめて出力する場合 +compile_file + lang_hooks.decls.final_write_globals = c_write_global_declarations flag_unit_at_a_timeが偽なら実行 + cgraph_optimize + cgraph_expand_all_functions + cgraph_expand_function + +GIMPLE treeから RTL への変換 +pass.execute = tree_expand_cfg() + +RTLからアセンブラへの変換pass final.cで定義 +pass_final.execute == rest_of_handle_final in final.c + + +最終的な RTL=>"文字列" 変換する pass +execute_one_pass() + rest_of_handle_final() + assemble_start_function() + final_start_function() + final() # insnリストを出力 + final_scan_insn() # 与えられたinsnのアセンブラを出力 + recog_memoized() # insn_data[code]のcode 決定 + get_insn_template() # 出力するアセンブラのchar*文字列を返す + output_asm_insn() # 文字列の%..を修正してファイルに出力 + final_end_function() + assemble_end_function() + +RTLの仮想レジスタを物理レジスタに置き換える pass +execute_one_pass() + instantiate_virtual_regs() + instantiate_virtual_regs_in_insn() for each instruction + extract_insn() + recog_memoized() + insn_extract() +ppcではこのrecog_memoizedで-1しか返ってこないことで落ちる + +下のmdのmatch_operand 0がaddressにしか対応してないのが問題だと思う +;; sibling call patterns +(define_expand "sibcall" + [(parallel [(call (mem:SI (match_operand 0 "address_operand" "")) + (match_operand 1 "" "")) + (use (match_operand 2 "" "")) + (use (reg:SI LR_REGNO)) + (return)])] + "" + " + { + #if TARGET_MACHO + if (MACHOPIC_INDIRECT) + operands[0] = machopic_indirect_call_target (operands[0]); + #endif + + gcc_assert (GET_CODE (operands[0]) == MEM); + gcc_assert (GET_CODE (operands[1]) == CONST_INT); + + operands[0] = XEXP (operands[0], 0); + }") + + +targetm.asm_outから出力 +ターゲットマシンによってtargetm構造体の内容が変わる。 + + + +/* In all nodes that are expressions, this is the data type of the expression. + In POINTER_TYPE nodes, this is the type that the pointer points to. + In ARRAY_TYPE nodes, this is the type of the elements. + In VECTOR_TYPE nodes, this is the type of the elements. */ +#define TREE_TYPE(NODE) ((NODE)->common.type) // in tree.h +このnodeの型を表す(functionなら関数の型、pointerならそいつのさしている型.. + +/* The tree-code says what kind of node it is. + Codes are defined in tree.def. */ +#define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code) // in tree.h +このnodeがどんなtreeなのかを表す + + + +c_parser_compound_statement() + c_begin_compound_stmt() + c_parser_compund_statement_nostart() __label__, lvarの処理 + c_parser_statement_after_labels() + c_end_compound_stmt() + +c_parser_if_statement() +c_parser_do_statement() + +c_parser_paren_condition() ifやwhileの'()'の中をparseする + + +parse expressions + +c_parser_unary_expression() increment,decrement, &, *ポインタ、アドレスの処理 +c_parser_postfix_expression() 数字や変数、文字列などの処理(TCCのunary()か) +c_parser_postfix_expression_after_primary() 変数とかの後ろの'[]'や'()'の処理(関数や配列の添字) + + +c_parser_* Cのパーサ +build_* treeの生成 (Cパーサから呼ばれる) +expand_* tree(gimple)のパーサ +emit_* rtlの生成 (treeパーサから呼ばれる) + + + + +宣言時の新しい識別子 +token->type==CPP_NAME +build_id_declarator + XOBNEWを使って parser_obstackに作られる => gcc_obstack_init in default.h +変数名等を格納するc_declaratorはparser_obstack上に作られ、 + + +tree.def +tree.[ch] + +union tree_node GTY((ptr_alias (union lang_tree_node), + desc ("tree_node_structure (&%h)"))) +{ + struct tree_common GTY ((tag ("IS_COMMON"))) common; + struct tree_int_cst GTY ((tag ("IS_INT_CST"))) common; + struct tree_real_cst GTY ((tag ("IS_REAL_CST"))) common; + .. + .. +}; +c-tree.h: +struct c_expr{ + tree value; + enum tree_code original_code; +} + + +tokenizer + +c_parser_peek_token() int c-parser.c 現在参照すべきtoken を返す + c_lex_one_token() in c-parser.c + c_lex_with_flags() in c-lex.c + cpp_get_token() in libcpp(macro.c) +c_parser_next_token_is( parser, token0) tokenを取得し、それがtoken0ならtrue +c_parser_consume_token( parser) 次のtokenを取ってくる + +parser->tokens[0,1] (c_token) +この[0]に現在のtokenの情報がある。 +[1]はnext? +新たなtokenはlibcppのcpp_get_tokenによって取得する。 + +cppでは'!'や'*'などの一つ一つのtokenとなんらかの文字列を返す +予約語等の処理はgccがやる. +token +struct c_token{ + enum cpp_ttype type: 8; /* libcppで得られるtokenのtype, '<','==', name, '['などなど */ + enum c_id_kind id_kind: 8; /* type==CPP=NAMEの時のみ */ + enum rid keyword: 8; /* Cの予約語(int, if, typedef, gotoなど) */ + pragma_kind: 7; + in_systemheader: 1; + tree value; + location_t location; +} +enum cpp_ttype in libcpp/include/cpplib.h +{ + TTYPE_TABLE ==>> CPP_EQ, CPP_NOT, ... , CPP_NAME, ..., CPP_PADDING, + N_TTYPES, + + /* Positions in the table. */ + CPP_LAST_EQ = CPP_LSHIFT, + CPP_FIRST_DIGRAPH = CPP_HASH, + CPP_LAST_PUNCTUATOR= CPP_ATSIGN, + CPP_LAST_CPP_OP = CPP_LESS_EQ +}; +本来予約語もCPP_NAMEに含まれるが、無理矢理CPP_KEYWORDを作っている +CPP_KEYWORDはc-parser.cで独自に定義、N_TTYPES+1 +typedef enum c_id_kind { + C_ID_ID, /* An ordinary identifier. */ + C_ID_TYPENAME, /* An identifier declared as a typedef name. */ + C_ID_CLASSNAME, /* An identifier declared as an Objective-C class name. */ + C_ID_NONE /* Not an identifier. */ +} c_id_kind; + + +enum c_declarator_kind { /* in c-tree.h */ + cdk_id, /* An identifier. */ + cdk_function, /* A function. */ + cdk_array, /* An array. */ + cdk_pointer, /* A pointer. */ + cdk_attrs /* Parenthesized declarator with nested attributes. */ +}; +struct c_declarator { /* in c-tree.h */ + enum c_declarator_kind kind; /* The kind of declarator. */ + struct c_declarator *declarator; /* Except for cdk_id, the contained declarator. For cdk_id, NULL. */ + location_t id_loc; /* Currently only set for cdk_id. */ + union { + tree id; /* For identifiers, an IDENTIFIER_NODE or NULL_TREE if an abstract declarator. */ + struct c_arg_info *arg_info; /* For functions. */ + struct { /* For arrays. */ + tree dimen; /* The array dimension, or NULL for [] and [*]. */ + int quals; /* The qualifiers inside []. */ + tree attrs; /* The attributes (currently ignored) inside []. */ + BOOL_BITFIELD static_p : 1; /* Whether [static] was used. */ + BOOL_BITFIELD vla_unspec_p : 1; /* Whether [*] was used. */ + } array; + int pointer_quals; /* For pointers, the qualifiers on the pointer type. */ + tree attrs; /* For attributes. */ + } u; +}; + +/* A type specifier keyword "void", "_Bool", "char", "int", "float", + "double", or none of these. */ +enum c_typespec_keyword { //でも使われてるのはdeclspec + cts_none, + cts_void, + cts_CbC_code, いる? + cts_bool, + cts_char, + cts_int, + cts_float, + cts_double, + cts_dfloat32, + cts_dfloat64, + cts_dfloat128 +}; +enum c_typespec_kind { + ctsk_resword, + ctsk_tagref, + ctsk_tagfirstref, + /* A definition of a tag such as "struct foo { int a; }". */ + ctsk_tagdef, + ctsk_typedef, + ctsk_objc, + ctsk_typeof +}; +struct c_typespec { + enum c_typespec_kind kind; + tree spec; +}; +struct c_declspecs { /* c-tree.c */ + /* The type specified, if a single type specifier such as a struct, + union or enum specifier, typedef name or typeof specifies the + whole type, or NULL_TREE if none or a keyword such as "void" or + "char" is used. Does not include qualifiers. */ + tree type; + /* The attributes from a typedef decl. */ + tree decl_attr; + /* When parsing, the attributes. Outside the parser, this will be + NULL; attributes (possibly from multiple lists) will be passed + separately. */ + tree attrs; + /* Any type specifier keyword used such as "int", not reflecting + modifiers such as "short", or cts_none if none. */ + enum c_typespec_keyword typespec_word; + /* The storage class specifier, or csc_none if none. */ + enum c_storage_class storage_class; + BOOL_BITFIELD declspecs_seen_p : 1; + BOOL_BITFIELD type_seen_p : 1; + BOOL_BITFIELD typedef_p : 1; + BOOL_BITFIELD default_int_p; + BOOL_BITFIELD long_p : 1; + BOOL_BITFIELD long_long_p : 1; + BOOL_BITFIELD short_p : 1; + BOOL_BITFIELD signed_p : 1; + : +} + + + + +**TAIL CALL OPTIMIZATION** +execute_tail_calls in tree-tailcall.c + tree_optimize_tail_calls_1(true) + たいした調査もせず、簡単にフラグCALL_EXPR_TAILCALLをたててるだけ。 + +expand_call 1834-3115 in calls.c + initialize_argument_information(); + 引数処理 + 引数をレジスタやスタックのどこに保存するかを決める + tree actparmsで示された引数をargs, args_sizeに格納する + 1011行目 We can't use sibcalls if a callee-copied argument is stored in the current function's frame. + if statement 2200行目: try_tail_call=0 + targetm.function_ok?for?sibcall(fndecl, exp) + args_size.constant > (current_function_args_size - current_function_pretend_args_size) + emit_call_1(); + SIBLING_CALL_P(..) = ( (ecf_flag & ECF_SIBLING) != 0); + +expand_callでtailcall可能かどうかの判定を詳しく行っているようだ +bool try_tail_call = CALL_EXPR_TAILCALL(exp); +2252あたりのfor文が怪しいが、900行ある。 + +2252 in calls.c +for(pass = try_tail_call ? 0:1; pass<2; pass++) 2253-3087 +2回ループ。 +1回目はtailcall用。 +2回目は普通のcalling +生成後にどちらかを選ぶ? +2227 args_size.constant > (current_function_args_size - current_function_pretend_args_size) + + hard_function_value + check_sibcall_argument_overlap + prepare_call_address + load_register_parameters + + + +Language Dependent Tree + v +GENERIC + v +GIMPLE + +GENERIC trees + LD trees + v +GIMPLE + + +**RTL** +RTL expression + クラス: RTX_OBJ, RTX_CONST_OBJ, _COMPARE _COMM_COMPARE _UNARY ... in rtx.def + オペランド: e(expression), i(integer), w, s, E, ... + +RTLへのアクセス +GET_CODE (RTX) (enum rtx_code) (RTX)->code + RTXのコード(種類)を返す +GET_RTX_CLASS (code) + このrtxコードのクラスを返す +GET_RTX_LENGTH (code) + このrtxコードのオペランドの数を返す +GET_RTX_FORMAT (code) + オペランドの種類を文字列で返す + i.e. "iuuBieieee" on CALL_INSN +XEXP(RTX, N) X->u.fld[N].rt_rtx + RTX のN番目のオペランドをexpressionとして取得する +XINT(RTX, N) X->u.fld[N].rt_int + RTX のN番目のオペランドをintegerとして取得する +XVEC(RTX, N) X->u.fld[N].rt_rtvec + RTX のN番目のオペランドをrtvectorとして取得する + XVECEXP(RTX, N, M) XVEC(RTX,N)->elem[M] + RTX のN番目のオペランドをrtvectorとし、その M番目の要素を返す + XVECLEN(RTX, N) XVEC(RTX,N)->num_elem + RTX のN番目のオペランドをrtvectorとし、そのサイズを返す + +struct rtvec_def GTY(()) { + int num_elem; /* number of elements */ + rtx GTY ((length ("%h.num_elem"))) elem[1]; +}; + + +typedef struct trx_def *rtx; //gcc/coretypes.h +struct rtx_def; //gcc/rtl.h +struct rtx_def GTY((chain_next ("RTX_NEXT (&%h)"), + chain_prev ("RTX_PREV (&%h)"))) +{ + /* The kind of expression this is. */ + ENUM_BITFIELD(rtx_code) code: 16; + + /* The kind of value the expression has. */ + ENUM_BITFIELD(machine_mode) mode : 8; + + /* 1 in a MEM if we should keep the alias set for this mem unchanged + when we access a component. + 1 in a CALL_INSN if it is a sibling call. + 1 in a SET that is for a return. + In a CODE_LABEL, part of the two-bit alternate entry field. */ + unsigned int jump : 1; + /* In a CODE_LABEL, part of the two-bit alternate entry field. + 1 in a MEM if it cannot trap. */ + unsigned int call : 1; + /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere. + 1 in a SUBREG if it references an unsigned object whose mode has been + from a promoted to a wider mode. + 1 in a SYMBOL_REF if it addresses something in the per-function + constants pool. + 1 in a CALL_INSN, NOTE, or EXPR_LIST for a const or pure call. + 1 in a JUMP_INSN, CALL_INSN, or INSN of an annulling branch. */ + unsigned int unchanging : 1; + /* 1 in a MEM or ASM_OPERANDS expression if the memory reference is volatile. + 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL, BARRIER, or NOTE + if it has been deleted. + 1 in a REG expression if corresponds to a variable declared by the user, + 0 for an internally generated temporary. + 1 in a SUBREG with a negative value. + 1 in a LABEL_REF or in a REG_LABEL note for a non-local label. + In a SYMBOL_REF, this flag is used for machine-specific purposes. */ + unsigned int volatil : 1; + /* 1 in a MEM referring to a field of an aggregate. + 0 if the MEM was a variable or the result of a * operator in C; + 1 if it was the result of a . or -> operator (on a struct) in C. + 1 in a REG if the register is used only in exit code a loop. + 1 in a SUBREG expression if was generated from a variable with a + promoted mode. + 1 in a CODE_LABEL if the label is used for nonlocal gotos + and must not be deleted even if its count is zero. + 1 in an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled + together with the preceding insn. Valid only within sched. + 1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and + from the target of a branch. Valid from reorg until end of compilation; + cleared before used. */ + unsigned int in_struct : 1; + /* At the end of RTL generation, 1 if this rtx is used. This is used for + copying shared structure. See `unshare_all_rtl'. + In a REG, this is not needed for that purpose, and used instead + in `leaf_renumber_regs_insn'. + 1 in a SYMBOL_REF, means that emit_library_call + has used it as the function. */ + unsigned int used : 1; + /* 1 in an INSN or a SET if this rtx is related to the call frame, + either changing how we compute the frame address or saving and + restoring registers in the prologue and epilogue. + 1 in a REG or MEM if it is a pointer. + 1 in a SYMBOL_REF if it addresses something in the per-function + constant string pool. */ + unsigned frame_related : 1; + /* 1 in a REG or PARALLEL that is the current function's return value. + 1 in a MEM if it refers to a scalar. + 1 in a SYMBOL_REF for a weak symbol. */ + unsigned return_val : 1; + + /* The first element of the operands of this rtx. + The number of operands and their types are controlled + by the `code' field, according to rtl.def. */ + union u { + rtunion fld[1]; + HOST_WIDE_INT hwint[1]; + struct block_symbol block_sym; + struct real_value rv; + } GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u; +}; + + +FUNCTION_TYPEの実態はtree_type +make_node_stat(FUNCTION_TYPE)で作成される + TREE_TYPE + TYPE_ARG_TYPES ->type.values + TYPE_UID ->type.uid + TYPE_ALIGN ->type.align + TYPE_USER_ALIGN ->type.user_align + TYPE_MAIN_VARIANT ->type.main_variant + TYPE_ATTRIBUTES ->type.attributes + +こいつの lang_flag_6 ビットフィールドをcode segmentかどうかのフラグとする。 +#define TYPE_LANG_FLAG_5(NODE) (TYPE_CHECK (NODE)->type.lang_flag_5) //tree.h +#define CbC_IS_CODE_SEGMENT(TYPE) TYPE_LANG_FLAG_5 (TYPE) //c-tree.h +code segmentを作ったらCbC_IS_CODE_SEGMENT(type) = 1 でセット できる? + + + + + + +**GENERIC TREE** +関数の型 + + unit size + align 64 symtab 0 alias set -1 precision 64 + pointer_to_this > + QI + size constant invariant 8> + unit size constant invariant 1> + align 8 symtab 0 alias set -1 + arg-types > + +関数の引数 + + unit size + align 32 .... + chain > + +配列 + + BLK + size constant invariant 320> + unit size constant invariant 40> + align 32 symtab 0 alias set -1 + domain unit size + align 32 symtab 0 alias set -1 precision 32 min max > + SI size unit size + align 32 symtab 0 alias set -1 precision 32 min max >> + +関数呼び出し + + side-effects arg 0 + unsigned SI + size + unit size + align 32 symtab 0 alias set -1> + constant invariant + arg 0 + addressable used public external decl_5 QI defer-output file test_tree.c line 2>> + arg 1 + chain + chain + chain + constant invariant 2.5e+0>>>>>> + + +build_function_call(tree fndecl, tree exprlist) +FUNCTION_DECLとEXPRのリストからCALL_EXPRを作って返す + +convert_arguments(arglist, params, function, fundecl); +check_function_arguments(); + + +配列の作り方 +icst : INTEGER_CST +itype: INTEGER_TYPE + +icst = build_int_cst (NULL_TREE, size-1); +itype = build_index_type (icst); +array = build_array_type + +//build_range_type(size_type, integer_zero_node, exp) + + + +**PPC** +http://developer.apple.com/documentation/DeveloperTools/Reference/Assembler/ASMIntroduction/chapter_1_section_1.html +http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/32bitPowerPC.html#//apple_ref/doc/uid/TP40002438-SW17 +http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/Reference/reference.html +http://www.freescale.co.jp/pdf/MPCFPE32BJ_R1a.pdf +http://www.nk.rim.or.jp/~jun/ppcasm/ppcasm01.html + + + + + +**ソースコード読み会 準備** +cd ~/public_html +mkdir gcc; cd gcc +checkout CbC_project/GCC; CbC_project/GCC +./configure --... +make +gtags +htags -Ffx -t 'GCC source tour' +cd ../../ +tar -czv CbC_project --exclude **/CVS -f GCC-source-....tar.gz + + + +normal tail call +(call_insn/j 24 23 0 (parallel [ + (call (mem:SI (symbol_ref:SI ("cs0") [flags 0x403] ) [0 S4 A8]) + (const_int 256 [0x100])) + (use (const_int 0 [0x0])) + (use (reg:SI 125)) + (return) + ]) -1 (nil) + (expr_list:REG_EH_REGION (const_int 0 [0x0]) + (nil)) + (expr_list:REG_DEP_TRUE (use (reg:SI 6 r6)) + (expr_list:REG_DEP_TRUE (use (reg:SI 5 r5)) + (expr_list:REG_DEP_TRUE (use (reg:SI 4 r4)) + (expr_list:REG_DEP_TRUE (use (reg:SI 3 r3)) + (nil)))))) + +indirect tail call +(call_insn/j 25 24 0 (parallel [ + (call (mem:SI (reg/f:SI 129) [0 S4 A8]) + (const_int 256 [0x100])) + (use (const_int 0 [0x0])) + (use (reg:SI 130)) + (return) + ]) -1 (nil) + (nil) + (expr_list:REG_DEP_TRUE (use (reg:SI 6 r6)) + (expr_list:REG_DEP_TRUE (use (reg:SI 5 r5)) + (expr_list:REG_DEP_TRUE (use (reg:SI 4 r4)) + (expr_list:REG_DEP_TRUE (use (reg:SI 3 r3)) + (nil)))))) + + + +CFLAGS='-O0 -gdwarf-2 -g3' ../GCC/configure --disable-nls --disable-bootstrap --enable-languages=c --prefix=$PWD/INSTALL-DIR --enable-checking=tree,rtl,assert --disable-shared --disable-threads --with-headers --with-system-zlib --with-newlib --enable-version-specific-runtime-libs --disable-libssp --target=spu + +../toolchain/gcc/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-shared --disable-threads --disable-checking --with-headers --with-system-zlib --with-newlib --enable-languages=c,c++,fortran --disable-nls --enable-version-specific-runtime-libs --disable-libssp --program-prefix=spu- --target=spu + + + + +$ cvs checkout CbC_project/GCC +$ mkdir tmp; cd tmp +$ wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.0/SRPMS/spu-gcc-4.1.1-107.src.rpm +$ rpm2cpio spu-gcc--4.1.1-107.src.rpm | cpio -i -v +$ tar xjvf gcc-r886.tar.bz2 +$ cat *.diff | patch -d ../CbC_project/GCC -p2 +$ cp toolchain/gcc/config.sub ../CbC_project/GCC/ +$ cp toolchain/gcc/gcc/config.gcc ../CbC_project/GCC/gcc/ +$ cd ../CbC_project/GCC +$ + + +change bit_merge to vec_merge in gcc/config/spu/spu.md +split0_completed; in recog.c, rtl.h, final.c +SPU_FLOAT_FORMAT +: diff -r c156f1bd5cd9 -r d0e37615691e CbC-scripts/make_headers.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-scripts/make_headers.py Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,124 @@ +#!/usr/bin/env python3.0 + + +import sys +import re +import getopt + +reserved_words = [ "if", "for", "switch", "return", "while", "else", ] + +PATTERN = "([a-zA-Z_][\w\s]*\**)\s([a-zA-Z_]\w*)\s*\(([^{/;]*)\)\s*\{" +# TODO: 関数パラメータ内にコメントがあると正しく動かない! +# TODO: int * const * とか大丈夫? +PROG = re.compile(PATTERN, re.S) + +omit_static=False +add_extern="" + +def truncate_comments(data): + pass + +def check_reserved_word(decl): + """ return true if decl's type and name is not reserved word. """ + + if decl["name"] in reserved_words or decl["type"] in reserved_words: + return False + return True + +def read_decls(file): + declarators = [] + + # open the file and read all lines into a string. + try: + fo = open(file, 'r') + lines = fo.readlines() + data = "".join(lines) + truncate_comments(data) + except IOError: + print("cannot read file %s" % file) + return None + + # find all matched strings. + # moiter is iterator of MatchObject. + moiter = PROG.finditer(data) + for mo in moiter: + tmp = { "type": mo.group(1), + "name": mo.group(2), + "parms": mo.group(3), + "offset": mo.start() } + if check_reserved_word(tmp): + declarators.append(tmp) + + return declarators + +def debug_print(decl): + for (key,value) in list(decl.items()): + if isinstance(value, str): + decl[key] = value.replace("\n"," ").replace("\t"," ") + + print("Type:\t{0:s}".format(decl["type"])) + print("Name:\t{0:s}".format(decl["name"])) + print("Params:\t{0:s}".format(decl["parms"])) + print("offset:\t{0:d}".format(decl["offset"])) + print("") + +def format_print(decl, file): + for (key,value) in list(decl.items()): + if isinstance(value, str): + decl[key] = value.replace("\n"," ").replace("\t"," ") + + print("/* defined in file {0:s} at offset {1:d} */".format(file,decl["offset"])) + print("{3:s}{0:s} {1:s} ({2:s});".format(decl["type"],decl["name"],decl["parms"], add_extern)) + print("") + +def getoptions(): + global omit_static, add_extern + + try: + opts, args = getopt.getopt(sys.argv[1:], 'se', [ 'omit-static', 'add-extern' ]) + except getopt.GetoptError as err: + print(err) + usage() + sys.exit(2) + + for opt,a in opts: + if opt in ("-s", "--omit-static"): + omit_static=True + elif opt in ("-e", "--add-extern"): + add_extern="extern " + else: + print("unhandled option {0}".format(opt)) + usage() + + return args + +def usage(): + print( """\ +Usage: {0:s} OPION... [FILE]... +OPTIONS: + -s, --omit-static omit static functions + -e, --add-extern add extern to all function declarations + """.format(sys.argv[0])) + +def main(): + + # option handling. + args = getoptions() + + for file in args: + # read function declaration from each file. + decls = read_decls(file) + if decls==None or len(decls)==0: + # no function found. + print("{0} have no function definition!".format(file)) + continue + + for decl in decls: + if omit_static and 0 <= decl["type"].find("static"): + # static function is ignored. + continue + #debug_print(decl) + format_print(decl, file) + +main() + diff -r c156f1bd5cd9 -r d0e37615691e CbC-scripts/make_headers.py2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CbC-scripts/make_headers.py2 Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +import re +import getopt + +reserved_words = [ "if", "for", "switch", "return", "while", "else", ] + +PATTERN = r"([a-zA-Z_][\w\s]*\**)\s([a-zA-Z_]\w*)\s*\(([^\{/;]*)\)\s*\{" +#PATTERN = r"([a-zA-Z_]\w*)\s+([a-zA-Z_]\w*)\s*\(([^;]*)\)\s*\{" +#PATTERN = r"((?:[a-zA-Z_]\w*)\s+)+?([a-zA-Z_]\w*)\s*\(([^;]*)\)\s*\{" +# TODO: 関数パラメータ内にコメントがあると正しく動かない! +PROG = re.compile(PATTERN, re.S) + +omit_static=False +add_extern="" + +def truncate_comments(data): + pass + +def check_reserved_word(decl): + """ return true if decl's type and name is not reserved word. """ + + if decl["name"] in reserved_words or decl["type"] in reserved_words: + return False + return True + +def read_decls(file): + declarators = [] + + # open the file and read all lines into a string. + try: + fo = open(file, 'r') + lines = fo.readlines() + data = "".join(lines) + truncate_comments(data) + except IOError: + print "cannot read file %s" % file + return None + + # find all matched strings. + # moiter is iterator of MatchObject. + moiter = PROG.finditer(data) + for mo in moiter: + tmp = { "type": mo.group(1), + "name": mo.group(2), + "parms": mo.group(3), + "offset": mo.start() } + if check_reserved_word(tmp): + declarators.append(tmp) + + return declarators + +def debug_print(decl): + for (key,value) in decl.items(): + if isinstance(value, str): + decl[key] = value.replace("\n"," ").replace("\t"," ") + + print "Type:\t%s" % decl["type"] + print "Name:\t%s" % decl["name"] + print "Params:\t%s" % decl["parms"] + print "offset:\t%d" % decl["offset"] + print "" + #s = "%s %s ( %s );" % (decl["type"], decl["name"], decl["parms"]) + #print s, "/* offset: %d */" % decl["offset"] + +def format_print(decl, file): + for (key,value) in decl.items(): + if isinstance(value, str): + decl[key] = value.replace("\n"," ").replace("\t"," ") + + print "/* defined in file %s at offset %d */" % (file,decl["offset"]) + print "%s%s %s (%s);" % (add_extern, decl["type"],decl["name"],decl["parms"]) + print "" + +def getoptions(): + global omit_static, add_extern + + try: + opts, args = getopt.getopt(sys.argv[1:], 'se', [ 'omit-static', 'add-extern' ]) + except getopt.GetoptError: + print(err) + usage() + sys.exit(2) + + for opt,a in opts: + if opt in ("-s", "--omit-static"): + omit_static=True + elif opt in ("-e", "--add-extern"): + add_extern="extern " + else: + print("unhandled option {0}".format(opt)) + usage() + + return args + +def usage(): + print( """\ +Usage: {0:s} OPION... [FILE]... +OPTIONS: + -s, --omit-static omit static functions + -e, --add-extern add extern to all function declarations + """.format(sys.argv[0])) + +def main(): + # option handling. + args = getoptions() + + for file in args: + # read function declaration from each file. + decls = read_decls(file) + if decls==None or len(decls)==0: + # no function found. + print "%s have no function definition!" % file + continue + + for decl in decls: + if omit_static and 0 <= decl["type"].find("static"): + # static function is ignored. + continue + #debug_print(decl) + format_print(decl, file) + +main() + diff -r c156f1bd5cd9 -r d0e37615691e configure --- a/configure Sun Feb 07 18:28:00 2010 +0900 +++ b/configure Sun Feb 07 18:30:10 2010 +0900 @@ -272,7 +272,7 @@ PACKAGE_BUGREPORT= ac_unique_file="move-if-change" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc extra_mpfr_configure_flags ppllibs pplinc clooglibs clooginc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc ppllibs pplinc clooglibs clooginc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag' ac_pwd=`pwd` @@ -4596,7 +4596,6 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs" gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc" - extra_mpfr_configure_flags='--with-gmp-build=$$r/$(HOST_SUBDIR)/gmp' # Do not test the gmp version. Assume that it is sufficient, since # it is in the source tree, and the library has not been built yet # but it would be included on the link line in the version check below @@ -4811,7 +4810,6 @@ - # Allow host libstdc++ to be specified for static linking with PPL. # Check whether --with-host-libstdcxx or --without-host-libstdcxx was given. @@ -13253,7 +13251,6 @@ s,@do_compare@,$do_compare,;t t s,@gmplibs@,$gmplibs,;t t s,@gmpinc@,$gmpinc,;t t -s,@extra_mpfr_configure_flags@,$extra_mpfr_configure_flags,;t t s,@ppllibs@,$ppllibs,;t t s,@pplinc@,$pplinc,;t t s,@clooglibs@,$clooglibs,;t t diff -r c156f1bd5cd9 -r d0e37615691e gcc/ChangeLog.CbC --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/ChangeLog.CbC Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,69 @@ +2009-08-20 Shinji KONO + + どうも、goto hoge(0),env; で、env を渡すのがよろしくない。 + goto hoge(0,env); + と言う形にして、hoge 側で env を設定するのはどうか? + + __code main_return2_1(int i,stack sp) { + goto (( (struct main_continuation *)sp)->main_ret)(0), + ((struct main_continuation *)sp)->env; + } + + を、 + + __code main_return2_1(int i,stack sp) { + goto (( (struct main_continuation *)sp)->main_ret)(0, + ((struct main_continuation *)sp)->env); + } + という形にする。 + + そうすれば、goto 文は、かなり簡単になる。 + +2009-08-20 Shinji KONO + +以下のようにすれば良いらしい... いっそ #define でも出来るが。 + + extern int printf(const char *, ...); + + void g( void (*ret)(int retval_,void *f) , void *fp) { + printf("g: fp = 0x%x\n",__builtin_frame_address(0)); + (*ret)(5,fp); + } + + int f() + { + + int retval = 1; + void (*ret)(int retval_,void *fp) ; + + ret = ({ + __label__ exit0; + volatile static flag = 0; + void __return_func(int retval_,void *fp) { + retval = retval_; + goto exit0; + } + if (flag) { + exit0: + printf("f1: fp = 0x%x\n",__builtin_frame_address(0)); + return retval; + } + __return_func; + }); + + printf("f0: fp = 0x%x\n",__builtin_frame_address(0)); + + g(ret,__builtin_frame_address(0)); + + printf("bad\n"); + + return retval; + } + + + int + main() + { + printf("%d\n",f()); + } + diff -r c156f1bd5cd9 -r d0e37615691e gcc/Makefile.in --- a/gcc/Makefile.in Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/Makefile.in Sun Feb 07 18:30:10 2010 +0900 @@ -1324,9 +1324,9 @@ $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS)) \ $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) \ mips-tfile.o mips-tdump.o \ - $(PROTO_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) - -BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) + $(PROTO_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) @MACROFUNC@ + +BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB) $(LIBDECNUMBER) @MACROFUNC@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \ @@ -2521,7 +2521,7 @@ hard-reg-set.h $(TOPLEV_H) hard-reg-set.h except.h $(TM_P_H) $(PREDICT_H) \ libfuncs.h $(REAL_H) langhooks.h $(BASIC_BLOCK_H) tree-mudflap.h \ $(BUILTINS_DEF) $(MACHMODE_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) value-prof.h -calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ +calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) cbc-goto.h coretypes.h $(TM_H) $(RTL_H) \ $(TREE_H) $(FLAGS_H) $(EXPR_H) $(OPTABS_H) langhooks.h $(TARGET_H) \ libfuncs.h $(REGS_H) $(TOPLEV_H) output.h $(FUNCTION_H) $(TIMEVAR_H) $(TM_P_H) \ $(CGRAPH_H) except.h sbitmap.h $(DBGCNT_H) $(TREE_FLOW_H) diff -r c156f1bd5cd9 -r d0e37615691e gcc/aclocal.m4 --- a/gcc/aclocal.m4 Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/aclocal.m4 Sun Feb 07 18:30:10 2010 +0900 @@ -11,6 +11,8001 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +# codeset.m4 serial 2 (gettext-0.16) +dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET); return !cs;], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) + +# iconv.m4 serial AM6 (gettext-0.17) +dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ + dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + am_save_LIBS="$LIBS" + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi + AC_TRY_RUN([ +#include +#include +int main () +{ + /* Test against AIX 5.1 bug: Failures are not distinguishable from successful + returns. */ + { + iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); + if (cd_utf8_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\342\202\254"; /* EURO SIGN */ + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_utf8_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + return 1; + } + } +#if 0 /* This bug could be worked around by the caller. */ + /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + char buf[50]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if ((int)res > 0) + return 1; + } + } +#endif + /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is + provided. */ + if (/* Try standardized names. */ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) + /* Try AIX names. */ + && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) + /* Try HP-UX names. */ + && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) + return 1; + return 0; +}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac]) + LIBS="$am_save_LIBS" + ]) + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; + *) am_func_iconv=yes ;; + esac + else + am_func_iconv=no am_cv_lib_iconv=no + fi + if test "$am_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, + [Define if you have the iconv() function and it works.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) + +# lib-ld.m4 serial 3 (gettext-0.13) +dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# lib-link.m4 serial 13 (gettext-0.17) +dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +AC_PREREQ(2.54) + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname +dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + LIB[]NAME[]_PREFIX= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + AC_SUBST([LIB]NAME[_PREFIX]) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl acl_libext, +dnl acl_shlibext, +dnl acl_hardcode_libdir_flag_spec, +dnl acl_hardcode_libdir_separator, +dnl acl_hardcode_direct, +dnl acl_hardcode_minus_L. +AC_DEFUN([AC_LIB_RPATH], +[ + dnl Tell automake >= 1.10 to complain if config.rpath is missing. + m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" + acl_shlibext="$acl_cv_shlibext" + acl_libname_spec="$acl_cv_libname_spec" + acl_library_names_spec="$acl_cv_library_names_spec" + acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found +dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl Autoconf >= 2.61 supports dots in --with options. + define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], +[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + LIB[]NAME[]_PREFIX= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$acl_hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + LIB[]NAME[]_PREFIX="$basedir" + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +dnl For those cases where a variable contains several -L and -l options +dnl referring to unknown libraries and directories, this macro determines the +dnl necessary additional linker options for the runtime path. +dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) +dnl sets LDADDVAR to linker options needed together with LIBSVALUE. +dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, +dnl otherwise linking without libtool is assumed. +AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], +[ + AC_REQUIRE([AC_LIB_RPATH]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + $1= + if test "$enable_rpath" != no; then + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode directories into the resulting + dnl binary. + rpathdirs= + next= + for opt in $2; do + if test -n "$next"; then + dir="$next" + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= + else + case $opt in + -L) next=yes ;; + -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` + dnl No need to hardcode the standard /usr/lib. + if test "X$dir" != "X/usr/$acl_libdirstem"; then + rpathdirs="$rpathdirs $dir" + fi + next= ;; + *) next= ;; + esac + fi + done + if test "X$rpathdirs" != "X"; then + if test -n ""$3""; then + dnl libtool is used for linking. Use -R options. + for dir in $rpathdirs; do + $1="${$1}${$1:+ }-R$dir" + done + else + dnl The linker is used for linking directly. + if test -n "$acl_hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user + dnl must pass all path elements in one option. + alldirs= + for dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="$flag" + else + dnl The -rpath options are cumulative. + for dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + $1="${$1}${$1:+ }$flag" + done + fi + fi + fi + fi + fi + AC_SUBST([$1]) +]) + +# lib-prefix.m4 serial 5 (gettext-0.15) +dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible. + +dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and +dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't +dnl require excessive bracketing. +ifdef([AC_HELP_STRING], +[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], +[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_LIB_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing +dnl the basename of the libdir, either "lib" or "lib64". +AC_DEFUN([AC_LIB_PREPARE_MULTILIB], +[ + dnl There is no formal standard regarding lib and lib64. The current + dnl practice is that on a system supporting 32-bit and 64-bit instruction + dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit + dnl libraries go under $prefix/lib. We determine the compiler's default + dnl mode by looking at the compiler's library search path. If at least + dnl of its elements ends in /lib64 or points to a directory whose absolute + dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the + dnl default, namely "lib". + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi +]) + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 52 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e 1s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +_LT_REQUIRED_DARWIN_CHECKS + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Check if we have a version mismatch between libtool.m4 and ltmain.sh. +# +# Note: This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined. +# We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually +# calls AC_LIBTOOL_CONFIG and creates libtool. +# +_LT_VERSION_CHECK + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_VERSION_CHECK +# ----------------- +AC_DEFUN([_LT_VERSION_CHECK], +[AC_MSG_CHECKING([for correct ltmain.sh version]) +if test "x$ltmain" = "x" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** \$ltmain is not defined, please check the patch for consistency! *** +]) +fi +gentoo_lt_version="1.5.26" +gentoo_ltmain_version=`sed -n '/^[[ ]]*VERSION=/{s/^[[ ]]*VERSION=//;p;q;}' "$ltmain"` +if test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([ + +*** @<:@Gentoo@:>@ sanity check failed! *** +*** libtool.m4 and ltmain.sh have a version mismatch! *** +*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) *** + +Please run: + + libtoolize --copy --force + +if appropriate, please contact the maintainer of this +package (or your distribution) for help. +]) +else + AC_MSG_RESULT(yes) +fi +])# _LT_VERSION_CHECK + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# If no C compiler flags were specified, use CFLAGS. +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_DEFUN([_LT_CC_BASENAME], +[for cc_temp in $1""; do + case $cc_temp in + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_compiler_boilerplate=`cat conftest.err` +$rm conftest* +])# _LT_COMPILER_BOILERPLATE + + +# _LT_LINKER_BOILERPLATE +# ---------------------- +# Check for linker boilerplate output or warnings with +# the simple link test code. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err +_lt_linker_boilerplate=`cat conftest.err` +$rm -r conftest* +])# _LT_LINKER_BOILERPLATE + +# _LT_REQUIRED_DARWIN_CHECKS +# -------------------------- +# Check for some things on darwin +AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ + case $host_os in + rhapsody* | darwin*) + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) + + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], + [lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + echo "int foo(void){return 1;}" > conftest.c + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib ${wl}-single_module conftest.c + if test -f libconftest.dylib; then + lt_cv_apple_cc_single_mod=yes + rm -rf libconftest.dylib* + fi + rm conftest.c + fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], + [lt_cv_ld_exported_symbols_list], + [lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [lt_cv_ld_exported_symbols_list=yes], + [lt_cv_ld_exported_symbols_list=no]) + LDFLAGS="$save_LDFLAGS" + ]) + case $host_os in + rhapsody* | darwin1.[[0123]]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[[012]]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" + fi + if test "$DSYMUTIL" != ":"; then + _lt_dsymutil="~$DSYMUTIL \$lib || :" + else + _lt_dsymutil= + fi + ;; + esac +]) + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null 2>&1 && unset CDPATH + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then + LD="${LD-ld} -64" + fi + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + $2=yes + fi + else + $2=yes + fi + fi + $rm -r conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + teststring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + ;; + + interix*) + # We know the value 262144 and hardcode it with a safety zone (like BSD) + lt_cv_sys_max_cmd_len=196608 + ;; + + osf*) + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not + # nice to cause kernel panics so lets avoid the loop below. + # First set a reasonable default. + lt_cv_sys_max_cmd_len=16384 + # + if test -x /sbin/sysconfig; then + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in + *1*) lt_cv_sys_max_cmd_len=-1 ;; + esac + fi + ;; + sco3.2v5*) + lt_cv_sys_max_cmd_len=102400 + ;; + sysv5* | sco5v6* | sysv4.2uw2*) + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` + if test -n "$kargmax"; then + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` + else + lt_cv_sys_max_cmd_len=32768 + fi + ;; + *) + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_dlunknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . 2>&AS_MESSAGE_LOG_FD + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + old_striplib="$STRIP -S" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext_cmds=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ +if test "$GCC" = yes; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + else + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi]) +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix[[4-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +freebsd* | dragonfly*) + # DragonFly does not have aout. When/if they implement a new + # versioning mechanism, adjust this. + if test -x /usr/bin/objformat; then + objformat=`/usr/bin/objformat` + else + case $host_os in + freebsd[[123]]*) objformat=aout ;; + *) objformat=elf ;; + esac + fi + # Handle Gentoo/FreeBSD as it was Linux + case $host_vendor in + gentoo) + version_type=linux ;; + *) + version_type=freebsd-$objformat ;; + esac + + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + linux) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + need_lib_prefix=no + need_version=no + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[[01]]* | freebsdelf3.[[01]]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + *) # from 4.6 on, and DragonFly + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case $host_cpu in + ia64*) + shrext_cmds='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext_cmds='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext_cmds='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +interix[[3-9]]*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +rdos*) + dynamic_linker=no + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + version_type=freebsd-elf + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + if test "$with_gnu_ld" = yes; then + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + case $host_os in + sco3.2v5*) + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" + ;; + esac + fi + sys_lib_dlsearch_path_spec='/usr/lib' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no + +AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], +[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) +sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], +[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) +sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognize shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognize a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | dragonfly*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case $host_cpu in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +interix[[3-9]]*) + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux* | k*bsd*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.3*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + pc) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# Report which library types will actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= +_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + $as_unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + $as_unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" + if test "$GXX" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + if test "$lt_cv_apple_cc_single_mod" != "yes"; then + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + fi + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # Intel C++ + with_gnu_ld=yes + # version 8.0 and above of icpc choke on multiply defined symbols + # if we add $predep_objects and $postdep_objects, however 7.1 and + # earlier do not add the objects themselves. + case `$CC -V 2>&1` in + *"Version 7."*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + osf3*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC*) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + # For security reasons, it is highly recommended that you always + # use absolute paths for naming shared libraries, and exclude the + # DT_RUNPATH tag from executables and libraries. But doing so + # requires that you compile everything twice, which is a pain. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +esac +]) +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="\ + subroutine t + return + end +" + +# Code to be used in simple link tests +lt_simple_link_test_code="\ + program t + end +" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case $host_os in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix[[4-9]]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +_LT_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then create an initial libtool script +# with a default configuration from the untagged config vars. Otherwise +# add code to config.status for appending the configuration named by +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host +host_os=$host_os + +# The build system. +build_alias=$build_alias +build=$build +build_os=$build_os + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The directories searched by this compiler when creating a shared +# library +compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path=$lt_fix_srcfile_path + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux* | k*bsd*-gnu) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + fi + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris*) + symcode='[[BDRT]]' + ;; +sco3.2v5*) + symcode='[[DT]]' + ;; +sysv4.2uw2*) + symcode='[[DT]]' + ;; +sysv5* | sco5v6* | unixware* | OpenUNIX*) + symcode='[[ABDT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. + symxfrm="\\1 $ac_symprfx\\2 \\2" + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -rf conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | cygwin* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix[[4-9]]*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + interix*) + # This is c89, which is MS Visual C++ (no shared libs) + # Anyone wants to do a port? + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC* | pgcpp*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + cxx*) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix[[3-9]]*) + # Interix 3.x gcc -fpic/-fPIC options generate broken code. + # Instead, we relocate shared libraries at runtime. + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | cygwin* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix[[4-9]]*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + # Exclude shared library initialization/finalization symbols. +dnl Note also adjust exclude_expsyms for C++ above. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + + # See if GNU ld supports shared libraries. + case $host_os in + aix[[3-9]]*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix[[3-9]]*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag -Mnomain' ;; + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 + tmp_addflag=' -i_dynamic' ;; + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 + tmp_addflag=' -i_dynamic -nofor_main' ;; + ifc* | ifort*) # Intel Fortran compiler + tmp_addflag=' -nofor_main' ;; + esac + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<_LT_EOF 1>&2 + +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** reliably create shared libraries on SCO systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +_LT_EOF + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix[[4-9]]*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[[012]]|aix4.[[012]].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + ;; + esac + shared_flag='-shared' + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" + _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" + _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. + # Supported since Solaris 2.6 (maybe 2.5.1?) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # link with -lc, and that would cause any symbols used from libc to + # always be unresolved, which means just about no library would + # ever link correctly. If we're not using GNU ld we use -z text + # though, which does catch some bad symbols but isn't as heavy-handed + # as -z defs. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +IFS=$as_save_IFS +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && continue + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +]) +SED=$lt_cv_path_SED +AC_SUBST([SED]) +AC_MSG_RESULT([$SED]) +]) + +# progtest.m4 serial 4 (gettext-0.14.2) +dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +AC_PREREQ(2.50) + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[ +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + [[\\/]]* | ?:[[\\/]]*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. @@ -92,22 +8087,4 @@ fi ]) -m4_include([../config/acx.m4]) -m4_include([../config/codeset.m4]) -m4_include([../config/extensions.m4]) -m4_include([../config/gettext-sister.m4]) -m4_include([../config/iconv.m4]) -m4_include([../config/lcmessage.m4]) -m4_include([../config/lib-ld.m4]) -m4_include([../config/lib-link.m4]) -m4_include([../config/lib-prefix.m4]) -m4_include([../config/override.m4]) -m4_include([../config/progtest.m4]) -m4_include([../config/unwind_ipinfo.m4]) -m4_include([../config/warnings.m4]) -m4_include([../libtool.m4]) -m4_include([../ltoptions.m4]) -m4_include([../ltsugar.m4]) -m4_include([../ltversion.m4]) -m4_include([../lt~obsolete.m4]) m4_include([acinclude.m4]) diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-common.c --- a/gcc/c-common.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-common.c Sun Feb 07 18:30:10 2010 +0900 @@ -616,6 +616,10 @@ { "__asm__", RID_ASM, 0 }, { "__attribute", RID_ATTRIBUTE, 0 }, { "__attribute__", RID_ATTRIBUTE, 0 }, +#ifndef noCbC + /* CbC project */ + { "__code", RID_CbC_CODE, 0 }, +#endif { "__builtin_choose_expr", RID_CHOOSE_EXPR, D_CONLY }, { "__builtin_offsetof", RID_OFFSETOF, 0 }, { "__builtin_types_compatible_p", RID_TYPES_COMPATIBLE_P, D_CONLY }, @@ -624,6 +628,11 @@ { "__complex__", RID_COMPLEX, 0 }, { "__const", RID_CONST, 0 }, { "__const__", RID_CONST, 0 }, +#ifndef noCbC + /* CbC project */ + { "_CbC_environment", RID_CbC_ENV, 0 }, + { "_CbC_return", RID_CbC_RET, 0 }, +#endif { "__decltype", RID_DECLTYPE, D_CXXONLY }, { "__extension__", RID_EXTENSION, 0 }, { "__func__", RID_C99_FUNCTION_NAME, 0 }, diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-common.h --- a/gcc/c-common.h Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-common.h Sun Feb 07 18:30:10 2010 +0900 @@ -119,6 +119,11 @@ RID_AT_INTERFACE, RID_AT_IMPLEMENTATION, +#ifndef noCbC + /* Continuation based C */ + RID_CbC_CODE, RID_CbC_ENV, RID_CbC_RET, +#endif + RID_MAX, RID_FIRST_MODIFIER = RID_STATIC, diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-decl.c --- a/gcc/c-decl.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-decl.c Sun Feb 07 18:30:10 2010 +0900 @@ -63,6 +63,13 @@ #include "langhooks-def.h" #include "pointer-set.h" #include "gimple.h" +#ifndef noCbC +#include "cbc-tree.h" +tree cbc_env; +tree cbc_return_f; +location_t cbc_return; +#endif + /* In grokdeclarator, distinguish syntactic contexts of declarators. */ enum decl_context @@ -2339,8 +2346,13 @@ /* Generate an implicit declaration for identifier FUNCTIONID as a function of type int (). */ +#ifndef noCbC +tree +implicitly_declare (tree functionid, int fun) +#else tree implicitly_declare (tree functionid) +#endif { struct c_binding *b; tree decl = 0; @@ -2415,7 +2427,12 @@ } /* Not seen before. */ +#ifndef noCbC + decl = build_decl (FUNCTION_DECL, functionid, + fun==RID_CbC_CODE?build_function_type (void_type_node, NULL_TREE):default_function_type); +#else decl = build_decl (FUNCTION_DECL, functionid, default_function_type); +#endif DECL_EXTERNAL (decl) = 1; TREE_PUBLIC (decl) = 1; C_DECL_IMPLICIT (decl) = 1; @@ -4567,7 +4584,17 @@ } type_quals = TYPE_UNQUALIFIED; - type = build_function_type (type, arg_types); +#ifndef noCbC + if ( declspecs->typespec_word == cts_CbC_code ) + { + type = build_code_segment_type (type, arg_types); + } + else +#endif + { + type = build_function_type (type, arg_types); + } + declarator = declarator->declarator; /* Set the TYPE_CONTEXTs for each tagged type which is local to @@ -6079,6 +6106,68 @@ return tree_cons (decl, value, NULL_TREE); } +#ifndef noCbC +#define CbC_STACK_SIZE (1024 * 8) +static void cbc_set_codesegment(tree fndecl){ + tree args; + tree *nextp; +// tree itype; +// tree icst; +// tree padding_array; +// tree list; + int padding_size = CbC_STACK_SIZE; + + //CbC_IS_CODE_SEGMENT(TREE_TYPE(fndecl)) = 1; + //CbC_IS_CODE_SEGMENT(fndecl) = 1; + + nextp = & TYPE_ARG_TYPES (TREE_TYPE (fndecl)); + for (args = TYPE_ARG_TYPES (TREE_TYPE (fndecl)); args; + args = TREE_CHAIN (args)) + { + tree type = args ? TREE_VALUE (args) : 0; + tree type_size; + unsigned int size; + + if (type == void_type_node) + break; + + type_size = TYPE_SIZE (type); + size = TREE_INT_CST_LOW (type_size); + padding_size -= size; + + nextp = & TREE_CHAIN(args); + } + + /* error check. */ + if (padding_size<0) + { + error ("CbC: too many arguments on code segment %qE", fndecl); + return ; + } + else if (padding_size==0) + return ; + +#if 0 + /* itype is integer_type that means last index. */ + icst = build_int_cst (NULL_TREE, padding_size-1); + itype = build_index_type (icst); + + /* create array_type node. */ + padding_array = build_array_type (integer_type_node, itype); + + /* add array_type to this function's argument list + before void_type_node. */ + if (!args) + args = build_tree_list(NULL_TREE, void_type_node); + list = build_tree_list(NULL_TREE, padding_array); + TREE_CHAIN(list) = args; + *nextp = list; +#endif + + return ; +} +#endif + /* Create the FUNCTION_DECL for a function definition. DECLSPECS, DECLARATOR and ATTRIBUTES are the parts of @@ -6128,6 +6217,16 @@ decl1 = grokdeclarator (declarator, declspecs, FUNCDEF, true, NULL, &attributes, DEPRECATED_NORMAL); +#ifndef noCbC + cbc_return_f = NULL_TREE; + cbc_env = NULL_TREE; + if ( declspecs->typespec_word == cts_CbC_code ) + { + cbc_set_codesegment(decl1); + //CbC_IS_CODE_SEGMENT(TREE_TYPE(decl1)) = 1; + } +#endif + /* If the declarator is not suitable for a function definition, cause a syntax error. */ if (decl1 == 0) @@ -7258,6 +7357,11 @@ else if (specs->typespec_word == cts_void) error ("both % and % in " "declaration specifiers"); +#ifndef noCbC + else if (specs->typespec_word == cts_CbC_code) + error ("both % and % in " + "declaration specifiers"); +#endif else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); @@ -7287,6 +7391,11 @@ else if (specs->typespec_word == cts_void) error ("both % and % in " "declaration specifiers"); +#ifndef noCbC + else if (specs->typespec_word == cts_CbC_code) + error ("both % and % in " + "declaration specifiers"); +#endif else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); @@ -7319,6 +7428,11 @@ else if (specs->typespec_word == cts_void) error ("both % and % in " "declaration specifiers"); +#ifndef noCbC + else if (specs->typespec_word == cts_CbC_code) + error ("both % and % in " + "declaration specifiers"); +#endif else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); @@ -7348,6 +7462,11 @@ else if (specs->typespec_word == cts_void) error ("both % and % in " "declaration specifiers"); +#ifndef noCbC + else if (specs->typespec_word == cts_CbC_code) + error ("both % and % in " + "declaration specifiers"); +#endif else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); @@ -7376,6 +7495,11 @@ if (specs->typespec_word == cts_void) error ("both % and % in " "declaration specifiers"); +#ifndef noCbC + else if (specs->typespec_word == cts_CbC_code) + error ("both % and % in " + "declaration specifiers"); +#endif else if (specs->typespec_word == cts_bool) error ("both % and %<_Bool%> in " "declaration specifiers"); @@ -7478,6 +7602,27 @@ else specs->typespec_word = cts_void; return specs; +#ifndef noCbC + case RID_CbC_CODE: + if (specs->long_p) + error ("both % and % in " + "declaration specifiers"); + else if (specs->short_p) + error ("both % and % in " + "declaration specifiers"); + else if (specs->signed_p) + error ("both % and % in " + "declaration specifiers"); + else if (specs->unsigned_p) + error ("both % and % in " + "declaration specifiers"); + else if (specs->complex_p) + error ("both % and % in " + "declaration specifiers"); + else + specs->typespec_word = cts_CbC_code; + return specs; +#endif case RID_BOOL: if (specs->long_p) error ("both % and %<_Bool%> in " @@ -7832,6 +7977,9 @@ switch (specs->typespec_word) { case cts_void: +#ifndef noCbC + case cts_CbC_code: +#endif gcc_assert (!specs->long_p && !specs->short_p && !specs->signed_p && !specs->unsigned_p && !specs->complex_p); diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-parser.c --- a/gcc/c-parser.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-parser.c Sun Feb 07 18:30:10 2010 +0900 @@ -57,6 +57,9 @@ #include "vec.h" #include "target.h" #include "cgraph.h" +#ifndef noCbC +#include "cbc-tree.h" +#endif /* Initialization routine for this file. */ @@ -465,6 +468,9 @@ case RID_FRACT: case RID_ACCUM: case RID_SAT: +#ifndef noCbC + case RID_CbC_CODE: +#endif return true; default: return false; @@ -1529,6 +1535,30 @@ declspecs_add_type (specs, t); c_parser_consume_token (parser); break; +#ifndef noCbC + case RID_CbC_CODE: + if (!typespec_ok) + goto out; + attrs_ok = true; + seen_type = true; + if (c_dialect_objc ()) + parser->objc_need_raw_identifier = true; + t.kind = ctsk_resword; + t.spec = c_parser_peek_token (parser)->value; + declspecs_add_type (specs, t); + + /* + attrs = get_identifier("fastcall"); + attrs = build_tree_list(attrs, NULL_TREE); + declspecs_add_attrs(specs, attrs); + */ + attrs = build_tree_list (get_identifier("fastcall"), NULL_TREE); + /*attrs = build_tree_list (get_identifier("noreturn"), attrs);*/ + declspecs_add_attrs(specs, attrs); + + c_parser_consume_token (parser); + break; +#endif case RID_ENUM: if (!typespec_ok) goto out; @@ -3667,6 +3697,79 @@ c_parser_statement_after_labels (parser); } +#if 0 +static tree +c_parser_cbc_make_env(c_parser *parser) +{ + struct c_expr env; + tree field, fields=NULL_TREE; + tree env_struct, env_struct_type; + tree ebp, argsp; + tree tmp; + + c_parser_consume_token (parser); + env = c_parser_expr_no_commas (parser, NULL); + env = default_function_array_conversion (env); + + /* build type_node of environment structure */ + env_struct_type = start_struct (RECORD_TYPE, NULL_TREE); + field = build_decl (FIELD_DECL, get_identifier("sp"), ptr_type_node); + fields = chainon (field, fields); + field = build_decl (FIELD_DECL, get_identifier("argsp"), ptr_type_node); + fields = chainon (field, fields); + //field = build_decl (FIELD_DECL, get_identifier("retval"), intSI_type_node); + //fields = chainon (field, fields); + fields = nreverse(fields); + finish_struct (env_struct_type, fields, NULL_TREE); + + env_struct = build_c_cast (build_pointer_type(env_struct_type), env.value); + //build_component_ref (cbc_env, get_identifier("argsp")); + ebp = build_component_ref (build_indirect_ref (loc,env_struct, "CbCenv->sp"), get_identifier("sp")); + argsp = build_component_ref (build_indirect_ref (loc, env_struct, "CbCenv->sp"), get_identifier("argsp")); + //ebp = chainon (ebp, argsp); + tmp = build_tree_list (ebp, argsp); + + return tmp; +} +#endif + +static tree +cbc_replace_arguments (location_t loc, tree call) +{ + tree args; + tree fn; + tree tmp_decl; + int i=0; + + fn = CALL_EXPR_FN (call); + if ( TREE_CODE (fn)==PARM_DECL || !TREE_CONSTANT (fn) ) + { + tmp_decl = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE(fn)); + pushdecl (tmp_decl); + + add_stmt (build_modify_expr (loc, tmp_decl, NOP_EXPR, fn)); + CALL_EXPR_FN (call) = tmp_decl; + } + + args = CALL_EXPR_ARGS (call); + for ( ;args; args = TREE_CHAIN (args), i++) + { + tree arg = TREE_VALUE (args); + + //if ( !CONSTANT_CLASS_P (arg) && !VAR_OR_FUNCTION_DECL_P (arg) ) + if ( TREE_CODE (arg)==PARM_DECL || !TREE_CONSTANT (arg) ) + { + tmp_decl = build_decl (VAR_DECL, NULL_TREE, TREE_TYPE(arg)); + pushdecl (tmp_decl); + + add_stmt (build_modify_expr (loc, tmp_decl, NOP_EXPR, arg)); + CALL_EXPR_ARG (call, i) = tmp_decl; + } + } + + return call; +} + /* Parse a statement, other than a labeled statement. */ static void @@ -3701,8 +3804,14 @@ break; case RID_GOTO: c_parser_consume_token (parser); +#ifndef noCbC + if ( c_parser_next_token_is (parser, CPP_NAME) + && c_parser_peek_2nd_token (parser)->type == CPP_SEMICOLON ) + { +#else if (c_parser_next_token_is (parser, CPP_NAME)) { +#endif stmt = c_finish_goto_label (c_parser_peek_token (parser)->value); c_parser_consume_token (parser); } @@ -3712,7 +3821,34 @@ stmt = c_finish_goto_ptr (c_parser_expression (parser).value); } else +#ifndef noCbC + { + struct c_expr expr; + if (c_parser_next_token_is (parser, CPP_NAME)) + { + tree id = c_parser_peek_token (parser)->value; + location_t loc = c_parser_peek_token (parser)->location; + build_external_ref (id,RID_CbC_CODE , loc); + } + expr = c_parser_expr_no_commas (parser, NULL); + if (TREE_CODE(expr.value) == CALL_EXPR ) + { + location_t loc = c_parser_peek_token (parser)->location; + cbc_replace_arguments (loc, expr.value); + + TREE_TYPE(expr.value) = void_type_node; + /*tree env = NULL_TREE;**/ + CbC_IS_CbC_GOTO (expr.value) = 1; + CALL_EXPR_TAILCALL (expr.value) = 1; + add_stmt(expr.value); + stmt = c_finish_return (0); + } + else + c_parser_error (parser, "expected code segment jump or %<*%>"); + } +#else c_parser_error (parser, "expected identifier or %<*%>"); +#endif goto expect_semicolon; case RID_CONTINUE: c_parser_consume_token (parser); @@ -5088,11 +5224,127 @@ objc-string-literal */ +static void +cbc_finish_labeled_goto (location_t loc, tree label, tree retval) +{ + /* add statement below. + * + * if (0) { + * _cbc_exit0: + * return retval; + * } + */ + tree tlab; + tree cond; + + tree cstmt = c_begin_compound_stmt (true); + + tlab = define_label (loc, label); + gcc_assert (tlab); + decl_attributes (&tlab, NULL_TREE, 0); + add_stmt (build_stmt (LABEL_EXPR, tlab)); + + tree ret = c_finish_return (retval); + TREE_USED(ret) = 1; + + cond = integer_zero_node; + tree if_body = c_end_compound_stmt (cstmt, true); + TREE_SIDE_EFFECTS (cstmt) = 1; + c_finish_if_stmt (loc, cond, if_body, NULL_TREE, false); +} + +static tree +cbc_finish_nested_function (location_t loc, tree label, tree retval_decl) +{ + + /* add statement below. + * void __return_func(int _retval, void *_envp){ + * retval = _retval; + * goto exit0; + * } + */ + /* TODO: + * retval(lhs)のTREE_DECLを引数から取得するように + * int _retvalパラメータのタイプはretvalに合わせる + */ + + tree fnbody; + tree _retval_decl, _envp_decl; + struct c_declarator *declarator; + tree ident; + struct c_arg_info *args; + struct c_declspecs *specs; + struct c_typespec t; + { + push_scope (); + declare_parm_level (); + /*tree retval_type = TREE_TYPE(retval_decl);*/ + + _retval_decl = build_decl (PARM_DECL, get_identifier ("_retval"), TREE_TYPE(retval_decl)); + DECL_SOURCE_LOCATION (_retval_decl) = loc; + DECL_ARTIFICIAL (_retval_decl) = 1; + DECL_ARG_TYPE (_retval_decl) = TREE_TYPE(retval_decl); + pushdecl (_retval_decl); + finish_decl (_retval_decl, NULL_TREE, NULL_TREE); + + _envp_decl = build_decl (PARM_DECL, get_identifier ("_envp"), ptr_type_node); + DECL_SOURCE_LOCATION (_envp_decl) = loc; + DECL_ARTIFICIAL (_envp_decl) = 1; + DECL_ARG_TYPE (_envp_decl) = ptr_type_node; + pushdecl (_envp_decl); + finish_decl (_envp_decl, NULL_TREE, NULL_TREE); + + args = get_parm_info(false); + pop_scope(); + } + + t.kind = ctsk_resword; + t.spec = get_identifier("void"); + specs = build_null_declspecs(); + declspecs_add_type (specs, t); + finish_declspecs (specs); + + /* make nested function. */ + declarator = build_id_declarator (get_identifier ("_cbc_internal_return")); + declarator = build_function_declarator (args, declarator); + + c_push_function_context (); + + if (!start_function (specs, declarator, NULL_TREE)) + { + c_pop_function_context(); + gcc_assert (0); + } + store_parm_decls (); + + + /* start compound statement. */ + tree cstmt = c_begin_compound_stmt (true); + + add_stmt (build_modify_expr (loc, retval_decl, NOP_EXPR, _retval_decl)); + tree stmt = c_finish_goto_label (label); + + /* end compound statement. */ + fnbody = c_end_compound_stmt (cstmt, true); + TREE_SIDE_EFFECTS (cstmt) = 1; + + /* finish declaration of nested function. */ + tree decl = current_function_decl; + add_stmt (fnbody); + finish_function (); + c_pop_function_context (); + + add_stmt (build_stmt (DECL_EXPR, decl)); + return decl; + +} + static struct c_expr c_parser_postfix_expression (c_parser *parser) { struct c_expr expr, e1, e2, e3; struct c_type_name *t1, *t2; + static tree return_label1; location_t loc; switch (c_parser_peek_token (parser)->type) { @@ -5490,6 +5742,186 @@ expr.original_code = ERROR_MARK; } break; +#ifndef noCbC + case RID_CbC_ENV: + { + c_parser_consume_token (parser); + /* get value of %ebp. */ + tree env_tree = build_external_ref ( + get_identifier ("__builtin_frame_address"), 0, + c_parser_peek_token (parser)->location); + expr.value = build_function_call(env_tree, + build_tree_list (NULL_TREE, build_int_cst (NULL_TREE,0))); + expr.original_code = ERROR_MARK; + + } + break; + case RID_CbC_RET: + case RID_RETURN: + +#if 0 + if (cbc_return_f==0) + { tree retval; + + /* + Generates something like... + + int retval = 1; + void (*ret)(int retval_,void *fp) ; + + ret = ({ + __label__ exit0; + volatile static flag = 0; + void __return_func(int retval_,void *fp) { + retval = retval_; + goto exit0; + } + if (flag) { + exit0: + printf("f1: fp = 0x%x\n",__builtin_frame_address(0)); + return retval; + } + __return_func; + }); + + */ + + tree stmt = c_begin_stmt_expr (); + cbc_return_f = c_parser_peek_token (parser)->value; + cbc_return = c_parser_peek_token (parser)->location; + c_parser_consume_token (parser); + location_t next = c_parser_peek_token (parser)->location; + + // dummy variable for hidden condition + struct c_expr cexpr; + tree cond; + location_t loc; + loc = next; + tree decl_cond = + build_decl (VAR_DECL, get_identifier ("__return"), + intHI_type_node); + TREE_STATIC (decl_cond) = 1; + cexpr.value = lang_hooks.decls.pushdecl(decl_cond); + + cexpr.original_code = ERROR_MARK; + cond = c_objc_common_truthvalue_conversion(loc, cexpr.value); + if (EXPR_P (cond)) + SET_EXPR_LOCATION (cond, loc); + + + + + tree fwlabel = create_artificial_label (); + //TREE_USED(fwlabel) = 1; + + //add_stmt (build1 (GOTO_EXPR, void_type_node, fwlabel)); + tree block = c_begin_compound_stmt (flag_isoc99); + + tree tlab = lookup_label(cbc_return_f); + + tree decl= build_stmt (LABEL_EXPR, tlab); + //TREE_USED(decl) = 1; + add_stmt(decl); + + //tree hoge = build_int_cst(NULL_TREE,55); + retval = build_component_ref (cbc_env, get_identifier("retval")); + tree ret = c_finish_return (retval); + TREE_USED(ret) = 1; + tree first_body = c_end_compound_stmt (block, flag_isoc99); + + c_finish_if_stmt (loc, cond, first_body, NULL_TREE, false); + + // define_label(EXPR_LOCATION(decl) ,cbc_return_f); + return_label1 = + define_label(cbc_return ,cbc_return_f); + tree fwdef= build_stmt (LABEL_EXPR, fwlabel); + + //TREE_USED(fwdef) = 1; + add_stmt(fwdef); + TREE_SIDE_EFFECTS (block) = 1; + + // tree label = lookup_label(c_parser_peek_token (parser)->value); + //TREE_USED(label) = 1; + + tree value = build1(ADDR_EXPR, ptr_type_node, return_label1); + SET_EXPR_LOCATION (value, next); + TREE_SIDE_EFFECTS (value) = 1; + add_stmt(value); + + TREE_SIDE_EFFECTS (stmt) = 1; + expr.value = c_finish_stmt_expr (stmt); + expr.original_code = ERROR_MARK; + + + } + else + { + //tree label = lookup_label(c_parser_peek_token (parser)->value); + //TREE_USED(label) = 1; + //expr.value = build1(ADDR_EXPR, ptr_type_node, label); + expr.value = build1(ADDR_EXPR, ptr_type_node, return_label1); + c_parser_consume_token (parser); + } +#else //by KENT. + { + /* + ({ + __label__ _cbc_exit0; + void __return_func(int retval_, void *_envp){ + retval = retval_; + goto exit0; + } + if (0) { + _cbc_exit0: + return retval; + } + __return_func; + }); + */ + tree value, stmt, label, tlab, decl; + c_parser_consume_token (parser); + + stmt = c_begin_stmt_expr (); + cbc_return_f = c_parser_peek_token (parser)->value; + location_t location = c_parser_peek_token (parser)->location; + + /* create label. (__label__ _cbc_exit0;) */ + label = get_identifier ("_cbc_exit0"); + tlab = declare_label (label); + C_DECLARED_LABEL_FLAG (tlab) = 1; + add_stmt (build_stmt (DECL_EXPR, tlab)); + + /* declare retval. (int retval;) */ + tree decl_cond = + build_decl (VAR_DECL, get_identifier ("retval"), + TREE_TYPE (TREE_TYPE (current_function_decl))); + TREE_STATIC (decl_cond) = 1; + DECL_ARTIFICIAL (decl_cond) = 1; + pushdecl (decl_cond); + + /* define nested function. */ + decl = + cbc_finish_nested_function (location, label, decl_cond); + + /* define if-ed goto label and return statement. */ + cbc_finish_labeled_goto (location, label, decl_cond); + + /* get pointer to nested function. */ + value = build_addr (decl , current_function_decl); + SET_EXPR_LOCATION (value, location); + add_stmt (value); + /*value = build_external_ref (get_identifier("_cbc_internal_return"), false, location);*/ + /*value = build_unary_op (location, ADDR_EXPR, value, 0);*/ + /*add_stmt (value);*/ + + TREE_SIDE_EFFECTS (stmt) = 1; + expr.value = c_finish_stmt_expr (stmt); + expr.original_code = ERROR_MARK; + } + +#endif //0 + break; +#endif //noCbC default: c_parser_error (parser, "expected expression"); expr.value = error_mark_node; diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-tree.h --- a/gcc/c-tree.h Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-tree.h Sun Feb 07 18:30:10 2010 +0900 @@ -213,6 +213,9 @@ cts_int, cts_float, cts_double, +#ifndef noCbC + cts_CbC_code, +#endif cts_dfloat32, cts_dfloat64, cts_dfloat128, @@ -480,7 +483,11 @@ struct c_declspecs *, tree, tree *); extern tree groktypename (struct c_type_name *); extern tree grokparm (const struct c_parm *); +#ifndef noCbC +extern tree implicitly_declare (tree,int); +#else extern tree implicitly_declare (tree); +#endif extern void keep_next_level (void); extern void pending_xref_error (void); extern void c_push_function_context (void); diff -r c156f1bd5cd9 -r d0e37615691e gcc/c-typeck.c --- a/gcc/c-typeck.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/c-typeck.c Sun Feb 07 18:30:10 2010 +0900 @@ -44,6 +44,9 @@ #include "tree-iterator.h" #include "gimple.h" #include "tree-flow.h" +#ifndef noCbC + #include "cbc-tree.h" +#endif /* Possible cases of implicit bad conversions. Used to select diagnostic messages in convert_for_assignment. */ @@ -403,6 +406,9 @@ /* Function types: prefer the one that specified arg types. If both do, merge the arg types. Also merge the return types. */ { +#ifndef noCbC + int is_code_segment = CbC_IS_CODE_SEGMENT(t1); +#endif tree valtype = composite_type (TREE_TYPE (t1), TREE_TYPE (t2)); tree p1 = TYPE_ARG_TYPES (t1); tree p2 = TYPE_ARG_TYPES (t2); @@ -419,12 +425,20 @@ /* Simple way if one arg fails to specify argument types. */ if (TYPE_ARG_TYPES (t1) == 0) { +#ifndef noCbC + if (is_code_segment) t1 = build_code_segment_type (valtype, TYPE_ARG_TYPES (t2)); + else +#endif t1 = build_function_type (valtype, TYPE_ARG_TYPES (t2)); t1 = build_type_attribute_variant (t1, attributes); return qualify_type (t1, t2); } if (TYPE_ARG_TYPES (t2) == 0) { +#ifndef noCbC + if (is_code_segment) t1 = build_code_segment_type (valtype, TYPE_ARG_TYPES (t1)); + else +#endif t1 = build_function_type (valtype, TYPE_ARG_TYPES (t1)); t1 = build_type_attribute_variant (t1, attributes); return qualify_type (t1, t2); @@ -518,6 +532,11 @@ } c_override_global_bindings_to_false = false; + +#ifndef noCbC + if (is_code_segment) t1 = build_code_segment_type (valtype, newargs); + else +#endif t1 = build_function_type (valtype, newargs); t1 = qualify_type (t1, t2); /* ... falls through ... */ @@ -2199,7 +2218,11 @@ ref = decl; else if (fun) /* Implicit function declaration. */ +#ifndef noCbC + ref = implicitly_declare (id, fun); +#else ref = implicitly_declare (id); +#endif else if (decl == error_mark_node) /* Don't complain about something that's already been complained about. */ @@ -2747,7 +2770,13 @@ gcc_assert (parmnum == nargs); +#ifndef noCbC + if (typetail != 0 && TREE_VALUE (typetail) != void_type_node + //&& !CbC_IS_CODE_SEGMENT(TREE_TYPE(fundecl)) ) + && !(fundecl&&CbC_IS_CODE_SEGMENT(fundecl)) ) +#else if (typetail != 0 && TREE_VALUE (typetail) != void_type_node) +#endif { error ("too few arguments to function %qE", function); return -1; diff -r c156f1bd5cd9 -r d0e37615691e gcc/calls.c --- a/gcc/calls.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/calls.c Sun Feb 07 18:30:10 2010 +0900 @@ -98,6 +98,9 @@ word-sized pseudos we made. */ rtx *aligned_regs; int n_aligned_regs; +#ifndef noCbC +rtx exprs; +#endif }; /* A vector of one char per byte of stack space. A byte if nonzero if @@ -1879,6 +1882,11 @@ return true; } +#ifndef noCbC +#include "cbc-tree.h" +#include "cbc-goto.h" +#endif + /* If X is a likely-spilled register value, copy it to a pseudo register and return that register. Return X otherwise. */ @@ -1904,7 +1912,7 @@ return x; } -/* Generate all the code for a CALL_EXPR exp +/* Generate all the code for a function call and return an rtx for its value. Store the value in TARGET (specified as an rtx) if convenient. If the value is stored in TARGET then TARGET is returned. @@ -2374,6 +2382,50 @@ preferred_unit_stack_boundary = preferred_stack_boundary / BITS_PER_UNIT; +#ifndef noCbC + if ( fntype + && CbC_IS_CbC_GOTO (exp) // it's better? than CALL_EXPR_TAILCALL() + && CbC_IS_CODE_SEGMENT (TREE_TYPE (current_function_decl)) + ) + { + + args_size.constant = CbC_PRETENDED_STACK_SIZE; + return expand_cbc_goto(exp, target, fndecl, funtype, fntype, + addr, ignore, flags, num_actuals, args, &args_size, + args_so_far, + old_stack_level, reg_parm_stack_space, old_pending_adj, + preferred_stack_boundary, preferred_unit_stack_boundary, + structure_value_addr, old_inhibit_defer_pop); + } + else if ( CbC_IS_CbC_GOTO (exp) ) + { + // TODO: 関数からコードセグメントへの遷移 + /* + if (fndecl) + { + char *name_callee = IDENTIFIER_POINTER(DECL_NAME(fndecl)); + warning(0, "no warning: code segment `%s' has been called from a function.", name_callee); + } + else + { + warning(0, "no warning: unnamed code segment has been called from a function."); + } + */ + args_size.constant = CbC_PRETENDED_STACK_SIZE; + } + else if ( fndecl && CbC_IS_CODE_SEGMENT (TREE_TYPE (fndecl)) ) + { + // 警告コードセグメントを関数呼び出し + //char *name= IDENTIFIER_POINTER(DECL_NAME(fndecl)); + //warning (0, "code segment `%s' has been \"called\" instead \"goto\".", name); + } + else if (CbC_IS_CODE_SEGMENT(TREE_TYPE (current_function_decl)) ) + { + // code segment内部からの関数呼び出し。なんも問題ない。 + //warning (0, "no warning: normal call from a code segment."); + } +#endif + /* We want to make two insn chains; one for a sibling call, the other for a normal call. We will select one of the two chains after initial RTL generation is complete. */ @@ -2444,12 +2496,27 @@ and there may be a minimum required size. When generating a sibcall pattern, do not round up, since we'll be re-using whatever space our caller provided. */ +#ifndef noCbC + if ( fntype && CbC_IS_CODE_SEGMENT(fntype) ) + { + unadjusted_args_size = args_size.constant; + adjusted_args_size.constant = CbC_PRETENDED_STACK_SIZE; + compute_argument_block_size (reg_parm_stack_space, + &adjusted_args_size, + fndecl, fntype, + (pass == 0 ? 0 + : preferred_stack_boundary)); + } + else +#endif + { unadjusted_args_size = compute_argument_block_size (reg_parm_stack_space, &adjusted_args_size, fndecl, fntype, (pass == 0 ? 0 : preferred_stack_boundary)); + } old_stack_allocated = stack_pointer_delta - pending_stack_adjust; diff -r c156f1bd5cd9 -r d0e37615691e gcc/cbc-goto.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/cbc-goto.h Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,803 @@ + +static void +preexpand_argument_expr (struct arg_data *, int); + +static void +determine_order(int *, int); + +static int +expand_one_arg_push (struct arg_data *, rtx, int, int, int); + +static void +push_overlaps(struct arg_data *, int); + +static int +check_frame_offset(rtx); + + +static rtx +expand_cbc_goto (tree exp, rtx target, tree fndecl, tree funtype, tree fntype, + tree addr, + int ignore, + int flags, + int num_actuals, + struct arg_data *args, + struct args_size *args_size, + CUMULATIVE_ARGS args_so_far, + rtx old_stack_level, + int reg_parm_stack_space, + int old_pending_adj, + unsigned HOST_WIDE_INT preferred_stack_boundary, + unsigned HOST_WIDE_INT preferred_unit_stack_boundary, + rtx structure_value_addr, + //int structure_value_addr_parm, + int old_inhibit_defer_pop + ) +{ + + /* folowing variables is just copied from expand_call. */ + + int pass = 0; + int i; +#ifdef REG_PARM_STACK_SPACE + /* Define the boundary of the register parm stack space that needs to be + saved, if any. */ +#endif + rtx funexp; + rtx valreg; + struct args_size adjusted_args_size; + int unadjusted_args_size; + int reg_parm_seen; + rtx static_chain_value; + int old_stack_allocated; + int old_stack_pointer_delta = 0; + int old_stack_arg_under_construction = 0; + rtx call_fusage; + char *stack_usage_map_buf = NULL; + rtx argblock = 0; + HOST_WIDE_INT struct_value_size = 0; + int pcc_struct_value = 0; + int initial_highest_arg_in_use = highest_outgoing_arg_in_use; + char *initial_stack_usage_map = stack_usage_map; + rtx tail_call_insns = NULL_RTX; + + + int *store_order; + + + int sibcall_failure = 0; + /* We want to emit any pending stack adjustments before the tail + recursion "call". That way we know any adjustment after the tail + recursion call can be ignored if we indeed use the tail + call expansion. */ + int save_pending_stack_adjust = 0; + int save_stack_pointer_delta = 0; + rtx insns; + rtx before_call, next_arg_reg; + + /* State variables we need to save and restore between + iterations. */ + save_pending_stack_adjust = pending_stack_adjust; + save_stack_pointer_delta = stack_pointer_delta; + flags |= ECF_SIBCALL; + + /* Other state variables that we must reinitialize each time + through the loop (that are not initialized by the loop itself). */ + argblock = 0; + call_fusage = 0; + + /* Start a new sequence for the normal call case. + + From this point on, if the sibling call fails, we want to set + sibcall_failure instead of continuing the loop. */ + start_sequence (); + + /* Don't let pending stack adjusts add up to too much. + Also, do all pending adjustments now if there is any chance + this might be a call to alloca or if we are expanding a sibling + call sequence or if we are calling a function that is to return + with stack pointer depressed. + Also do the adjustments before a throwing call, otherwise + exception handling can fail; PR 19225. */ + if (pending_stack_adjust >= 32 + || (pending_stack_adjust > 0 + && (flags & ECF_MAY_BE_ALLOCA)) + || (pending_stack_adjust > 0 + && flag_exceptions && !(flags & ECF_NOTHROW)) + || pass == 0) + do_pending_stack_adjust (); + + + if (pass == 0 && crtl->stack_protect_guard) + stack_protect_epilogue (); + + adjusted_args_size = *args_size; + /* Compute the actual size of the argument block required. The variable + and constant sizes must be combined, the size may have to be rounded, + and there may be a minimum required size. When generating a sibcall + pattern, do not round up, since we'll be re-using whatever space our + caller provided. */ + unadjusted_args_size + = compute_argument_block_size (reg_parm_stack_space, + &adjusted_args_size, + fndecl, fntype, + (pass == 0 ? 0 + : preferred_stack_boundary)); + + old_stack_allocated = stack_pointer_delta - pending_stack_adjust; + + argblock = crtl->args.internal_arg_pointer; + + argblock +#ifdef STACK_GROWS_DOWNWARD + = plus_constant (argblock, crtl->args.pretend_args_size); +#else + = plus_constant (argblock, -crtl->args.pretend_args_size); +#endif + + + stored_args_map = sbitmap_alloc (args_size->constant); + sbitmap_zero (stored_args_map); + + + if (ACCUMULATE_OUTGOING_ARGS) + { + /* The save/restore code in store_one_arg handles all + cases except one: a constructor call (including a C + function returning a BLKmode struct) to initialize + an argument. */ + if (stack_arg_under_construction) + { + rtx push_size + = GEN_INT (adjusted_args_size.constant + + (OUTGOING_REG_PARM_STACK_SPACE ((!fndecl ? fntype + : TREE_TYPE (fndecl))) ? 0 + : reg_parm_stack_space)); + if (old_stack_level == 0) + { + emit_stack_save (SAVE_BLOCK, &old_stack_level, + NULL_RTX); + old_stack_pointer_delta = stack_pointer_delta; + old_pending_adj = pending_stack_adjust; + pending_stack_adjust = 0; + /* stack_arg_under_construction says whether a stack + arg is being constructed at the old stack level. + Pushing the stack gets a clean outgoing argument + block. */ + old_stack_arg_under_construction + = stack_arg_under_construction; + stack_arg_under_construction = 0; + /* Make a new map for the new argument list. */ + if (stack_usage_map_buf) + free (stack_usage_map_buf); + stack_usage_map_buf = XNEWVEC (char, highest_outgoing_arg_in_use); + stack_usage_map = stack_usage_map_buf; + memset (stack_usage_map, 0, highest_outgoing_arg_in_use); + highest_outgoing_arg_in_use = 0; + } + allocate_dynamic_stack_space (push_size, NULL_RTX, + BITS_PER_UNIT); + } + + /* If argument evaluation might modify the stack pointer, + copy the address of the argument list to a register. */ + for (i = 0; i < num_actuals; i++) + if (args[i].pass_on_stack) + { + argblock = copy_addr_to_reg (argblock); + break; + } + } + + compute_argument_addresses (args, argblock, num_actuals); + + /* in the case that + a function goto codesegment. + adjust stack space. */ + if ( !CbC_IS_CODE_SEGMENT(TREE_TYPE(current_function_decl)) ) + //if ( !(current_function_decl&&CbC_IS_CODE_SEGMENT(current_function_decl)) ) + { + HOST_WIDE_INT padding; + padding = CbC_PRETENDED_STACK_SIZE - + (crtl->args.size - crtl->args.pretend_args_size); + if (0&&padding > 0) + anti_adjust_stack (GEN_INT (padding)); + } + + /* Now that the stack is properly aligned, pops can't safely + be deferred during the evaluation of the arguments. */ + NO_DEFER_POP; + + funexp = rtx_for_function_call (fndecl, addr); + + /* Figure out the register where the value, if any, will come back. */ + valreg = 0; + + + /* Precompute all register parameters. It isn't safe to compute anything + once we have started filling any specific hard regs. */ + precompute_register_parameters (num_actuals, args, ®_parm_seen); + + if (CALL_EXPR_STATIC_CHAIN (exp)) + static_chain_value = expand_normal (CALL_EXPR_STATIC_CHAIN (exp)); + else + static_chain_value = 0; + + + /* parallel assignment */ + store_order = alloca (num_actuals * sizeof (int)); + memset (store_order, 0, num_actuals * sizeof (int)); + + /* fill the arg[i]->exprs. */ + for (i = 0; i < num_actuals; i++) + { + if (args[i].reg == 0 || args[i].pass_on_stack) + { + preexpand_argument_expr (&args[i], + adjusted_args_size.var != 0); + } + } + + + /* push overlapped argument to stack. */ + push_overlaps(args, num_actuals); + + /* determine ordering to store arguments. + and generate RTL that store some variable temporary, if it needed.*/ + /* now... this function do nothing. */ + determine_order(store_order, num_actuals); + + /* push arguments in the order . */ + for (i = 0; i < num_actuals; i++) + { + if (args[store_order[i]].reg == 0 + || args[store_order[i]].pass_on_stack + || args[store_order[i]].partial!=0 ) + { + expand_one_arg_push (&args[store_order[i]], argblock, flags, + adjusted_args_size.var != 0, + reg_parm_stack_space); + } + } + + + /* If register arguments require space on the stack and stack space + was not preallocated, allocate stack space here for arguments + passed in registers. */ +#ifdef OUTGOING_REG_PARM_STACK_SPACE + //if (!ACCUMULATE_OUTGOING_ARGS + //&& must_preallocate == 0 && reg_parm_stack_space > 0) + //anti_adjust_stack (GEN_INT (reg_parm_stack_space)); +#endif + + /* */ + funexp = prepare_call_address (funexp, static_chain_value, + &call_fusage, reg_parm_seen, pass == 0); + + /* store args into register. */ + load_register_parameters (args, num_actuals, &call_fusage, flags, + //pass == 0, &sibcall_failure); + 0, NULL); + + /* Save a pointer to the last insn before the call, so that we can + later safely search backwards to find the CALL_INSN. */ + before_call = get_last_insn (); + + /* Set up next argument register. For sibling calls on machines + with register windows this should be the incoming register. */ +#ifdef FUNCTION_INCOMING_ARG + if (pass == 0) + next_arg_reg = FUNCTION_INCOMING_ARG (args_so_far, VOIDmode, + void_type_node, 1); + else +#endif + next_arg_reg = FUNCTION_ARG (args_so_far, VOIDmode, + void_type_node, 1); + + /* All arguments and registers used for the call must be set up by + now! */ + + /* Stack must be properly aligned now. */ + gcc_assert (!pass + || !(stack_pointer_delta % preferred_unit_stack_boundary)); +#if 0 + /* store environment. */ + if ( env_tree!=NULL ) + { + emit_insn (gen_rtx_CLOBBER (VOIDmode, + gen_rtx_MEM (BLKmode, + hard_frame_pointer_rtx))); + emit_move_insn (hard_frame_pointer_rtx, env_rtx); + emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx)); + //pop_temp_slots (); + + emit_indirect_jump (funexp); + } +#endif + if (GET_CODE (funexp) != SYMBOL_REF) + { + push_temp_slots(); + preserve_temp_slots(funexp); + /* Generate the actual call instruction. */ + emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size, + adjusted_args_size.constant, struct_value_size, + //next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, + next_arg_reg, valreg, 0, call_fusage, + flags, & args_so_far); + pop_temp_slots(); + } + else + { + + /* Generate the actual call instruction. */ + emit_call_1 (funexp, exp, fndecl, funtype, unadjusted_args_size, + adjusted_args_size.constant, struct_value_size, + //next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, + next_arg_reg, valreg, 0, call_fusage, + flags, & args_so_far); + } + + /* If a non-BLKmode value is returned at the most significant end + of a register, shift the register right by the appropriate amount + and update VALREG accordingly. BLKmode values are handled by the + group load/store machinery below. */ + if (!structure_value_addr + && !pcc_struct_value + && TYPE_MODE (TREE_TYPE (exp)) != BLKmode + && targetm.calls.return_in_msb (TREE_TYPE (exp))) + { + if (shift_return_value (TYPE_MODE (TREE_TYPE (exp)), false, valreg)) + sibcall_failure = 1; + valreg = gen_rtx_REG (TYPE_MODE (TREE_TYPE (exp)), REGNO (valreg)); + } + + + /* For calls to `setjmp', etc., inform flow.c it should complain + if nonvolatile values are live. For functions that cannot return, + inform flow that control does not fall through. */ + + if ((flags & ECF_NORETURN) || pass == 0) + { + /* The barrier must be emitted + immediately after the CALL_INSN. Some ports emit more + than just a CALL_INSN above, so we must search for it here. */ + + rtx last = get_last_insn (); + while (!CALL_P (last)) + { + last = PREV_INSN (last); + /* There was no CALL_INSN? */ + gcc_assert (last != before_call); + } + + emit_barrier_after (last); + + /* Stack adjustments after a noreturn call are dead code. + However when NO_DEFER_POP is in effect, we must preserve + stack_pointer_delta. */ + if (inhibit_defer_pop == 0) + { + stack_pointer_delta = old_stack_allocated; + pending_stack_adjust = 0; + } + } + + /* If value type not void, return an rtx for the value. */ + + if (TYPE_MODE (TREE_TYPE (exp)) == VOIDmode + || ignore) + target = const0_rtx; + + if (targetm.calls.promote_function_return(funtype)) + { + /* If we promoted this return value, make the proper SUBREG. + TARGET might be const0_rtx here, so be careful. */ + if (REG_P (target) + && TYPE_MODE (TREE_TYPE (exp)) != BLKmode + && GET_MODE (target) != TYPE_MODE (TREE_TYPE (exp))) + { + tree type = TREE_TYPE (exp); + int unsignedp = TYPE_UNSIGNED (type); + int offset = 0; + enum machine_mode pmode; + + pmode = promote_mode (type, TYPE_MODE (type), &unsignedp, 1); + /* If we don't promote as expected, something is wrong. */ + gcc_assert (GET_MODE (target) == pmode); + + if ((WORDS_BIG_ENDIAN || BYTES_BIG_ENDIAN) + && (GET_MODE_SIZE (GET_MODE (target)) + > GET_MODE_SIZE (TYPE_MODE (type)))) + { + offset = GET_MODE_SIZE (GET_MODE (target)) + - GET_MODE_SIZE (TYPE_MODE (type)); + if (! BYTES_BIG_ENDIAN) + offset = (offset / UNITS_PER_WORD) * UNITS_PER_WORD; + else if (! WORDS_BIG_ENDIAN) + offset %= UNITS_PER_WORD; + } + target = gen_rtx_SUBREG (TYPE_MODE (type), target, offset); + SUBREG_PROMOTED_VAR_P (target) = 1; + SUBREG_PROMOTED_UNSIGNED_SET (target, unsignedp); + } + } + + /* If size of args is variable or this was a constructor call for a stack + argument, restore saved stack-pointer value. */ + + if (old_stack_level) + { + emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX); + stack_pointer_delta = old_stack_pointer_delta; + pending_stack_adjust = old_pending_adj; + old_stack_allocated = stack_pointer_delta - pending_stack_adjust; + stack_arg_under_construction = old_stack_arg_under_construction; + highest_outgoing_arg_in_use = initial_highest_arg_in_use; + stack_usage_map = initial_stack_usage_map; + } + + /* If this was alloca, record the new stack level for nonlocal gotos. + Check for the handler slots since we might not have a save area + for non-local gotos. */ + + if ((flags & ECF_MAY_BE_ALLOCA) && cfun->nonlocal_goto_save_area != 0) + update_nonlocal_goto_save_area (); + + /* Free up storage we no longer need. */ + for (i = 0; i < num_actuals; ++i) + if (args[i].aligned_regs) + free (args[i].aligned_regs); + + insns = get_insns (); + end_sequence (); + + tail_call_insns = insns; + + /* Restore the pending stack adjustment now that we have + finished generating the sibling call sequence. */ + + pending_stack_adjust = save_pending_stack_adjust; + stack_pointer_delta = save_stack_pointer_delta; + + /* Prepare arg structure for next iteration. */ + for (i = 0; i < num_actuals; i++) + { + args[i].value = 0; + args[i].aligned_regs = 0; + args[i].stack = 0; + } + + sbitmap_free (stored_args_map); + + + emit_insn(tail_call_insns); + crtl->tail_call_emit = true; + + return target; +} + + +static void +preexpand_argument_expr (struct arg_data *arg, + int variable_size ATTRIBUTE_UNUSED) +{ + tree pval = arg->tree_value; + rtx reg = 0; + int partial = 0; + + if (TREE_CODE (pval) == ERROR_MARK) + return; + + /* Push a new temporary level for any temporaries we make for + this argument. */ + push_temp_slots (); + + + /* If this isn't going to be placed on both the stack and in registers, + set up the register and number of words. */ + if (! arg->pass_on_stack) + { + //if (flags & ECF_SIBCALL) + reg = arg->tail_call_reg; + //else + //reg = arg->reg; + partial = arg->partial; + } + + /* Being passed entirely in a register. We shouldn't be called in + this case. */ + gcc_assert (reg == 0 || partial != 0); + + /* If this arg needs special alignment, don't load the registers + here. */ + if (arg->n_aligned_regs != 0) + reg = 0; + + /* Start a new sequence for the arg->exprs. */ + start_sequence (); + + + if (arg->pass_on_stack) + stack_arg_under_construction++; + + arg->value = expand_expr (pval, + (partial + || TYPE_MODE (TREE_TYPE (pval)) != arg->mode) + ? NULL_RTX : arg->stack, + VOIDmode, EXPAND_STACK_PARM); + + /* If we are promoting object (or for any other reason) the mode + doesn't agree, convert the mode. */ + + if (arg->mode != TYPE_MODE (TREE_TYPE (pval))) + arg->value = convert_modes (arg->mode, TYPE_MODE (TREE_TYPE (pval)), + arg->value, arg->unsignedp); + + if (arg->pass_on_stack) + stack_arg_under_construction--; + + arg->exprs = get_insns (); + end_sequence (); + + if (arg->exprs) emit_insn(arg->exprs); + + preserve_temp_slots (arg->value); + pop_temp_slots (); + + return ; +} + +static int +expand_one_arg_push (struct arg_data *arg, rtx argblock, int flags, + int variable_size ATTRIBUTE_UNUSED, int reg_parm_stack_space) +{ + tree pval = arg->tree_value; + int used = 0; + int i, lower_bound = 0, upper_bound = 0; + rtx reg = 0; + int partial = 0; + + /* Push a new temporary level for any temporaries we make for + this argument. */ + push_temp_slots (); + + + /* copy from store_one_arg. modify here after.*/ + /* If this isn't going to be placed on both the stack and in registers, + set up the register and number of words. */ + if (! arg->pass_on_stack) + { + //if (flags & ECF_SIBCALL) + reg = arg->tail_call_reg; + //else + //reg = arg->reg; + partial = arg->partial; + } + /* Being passed entirely in a register. We shouldn't be called in + this case. */ + gcc_assert (reg == 0 || partial != 0); + /* If this arg needs special alignment, don't load the registers + here. */ + if (arg->n_aligned_regs != 0) + reg = 0; + + + + + if (arg->value == arg->stack) + /* If the value is already in the stack slot, we are done. */ + ; + else if (arg->mode != BLKmode) + { + int size; + + /* Argument is a scalar, not entirely passed in registers. + (If part is passed in registers, arg->partial says how much + and emit_push_insn will take care of putting it there.) + + Push it, and if its size is less than the + amount of space allocated to it, + also bump stack pointer by the additional space. + Note that in C the default argument promotions + will prevent such mismatches. */ + + size = GET_MODE_SIZE (arg->mode); + /* Compute how much space the push instruction will push. + On many machines, pushing a byte will advance the stack + pointer by a halfword. */ +#ifdef PUSH_ROUNDING + size = PUSH_ROUNDING (size); +#endif + used = size; + + /* Compute how much space the argument should get: + round up to a multiple of the alignment for arguments. */ + if (none != FUNCTION_ARG_PADDING (arg->mode, TREE_TYPE (pval))) + used = (((size + PARM_BOUNDARY / BITS_PER_UNIT - 1) + / (PARM_BOUNDARY / BITS_PER_UNIT)) + * (PARM_BOUNDARY / BITS_PER_UNIT)); + + /* This isn't already where we want it on the stack, so put it there. + This can either be done with push or copy insns. */ + emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, + PARM_BOUNDARY, partial, reg, used - size, argblock, + ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space, + ARGS_SIZE_RTX (arg->locate.alignment_pad)); + + /* Unless this is a partially-in-register argument, the argument is now + in the stack. */ + if (partial == 0) + arg->value = arg->stack; + } + else + { + /* BLKmode, at least partly to be pushed. */ + + unsigned int parm_align; + int excess; + rtx size_rtx; + + /* Pushing a nonscalar. + If part is passed in registers, PARTIAL says how much + and emit_push_insn will take care of putting it there. */ + + /* Round its size up to a multiple + of the allocation unit for arguments. */ + + if (arg->locate.size.var != 0) + { + excess = 0; + size_rtx = ARGS_SIZE_RTX (arg->locate.size); + } + else + { + /* PUSH_ROUNDING has no effect on us, because emit_push_insn + for BLKmode is careful to avoid it. */ + excess = (arg->locate.size.constant + - int_size_in_bytes (TREE_TYPE (pval)) + + partial); + size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)), + NULL_RTX, TYPE_MODE (sizetype), 0); + } + + parm_align = arg->locate.boundary; + + /* When an argument is padded down, the block is aligned to + PARM_BOUNDARY, but the actual argument isn't. */ + if (FUNCTION_ARG_PADDING (arg->mode, TREE_TYPE (pval)) == downward) + { + if (arg->locate.size.var) + parm_align = BITS_PER_UNIT; + else if (excess) + { + unsigned int excess_align = (excess & -excess) * BITS_PER_UNIT; + parm_align = MIN (parm_align, excess_align); + } + } + + if ((flags & ECF_SIBCALL) && MEM_P (arg->value)) + { + /* emit_push_insn might not work properly if arg->value and + argblock + arg->locate.offset areas overlap. */ + rtx x = arg->value; + int i = 0; + + if (XEXP (x, 0) == crtl->args.internal_arg_pointer + || (GET_CODE (XEXP (x, 0)) == PLUS + && XEXP (XEXP (x, 0), 0) == + crtl->args.internal_arg_pointer + && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT)) + { + if (XEXP (x, 0) != crtl->args.internal_arg_pointer) + i = INTVAL (XEXP (XEXP (x, 0), 1)); + + /* expand_call should ensure this. */ + gcc_assert (!arg->locate.offset.var + && GET_CODE (size_rtx) == CONST_INT); + } + } + + emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx, + parm_align, partial, reg, excess, argblock, + ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space, + ARGS_SIZE_RTX (arg->locate.alignment_pad)); + + /* Unless this is a partially-in-register argument, the argument is now + in the stack. + + ??? Unlike the case above, in which we want the actual + address of the data, so that we can load it directly into a + register, here we want the address of the stack slot, so that + it's properly aligned for word-by-word copying or something + like that. It's not clear that this is always correct. */ + if (partial == 0) + arg->value = arg->stack_slot; + } + + if (arg->reg && GET_CODE (arg->reg) == PARALLEL) + { + tree type = TREE_TYPE (arg->tree_value); + arg->parallel_value + = emit_group_load_into_temps (arg->reg, arg->value, type, + int_size_in_bytes (type)); + } + + /* Mark all slots this store used. */ + if (ACCUMULATE_OUTGOING_ARGS && !(flags & ECF_SIBCALL) + && argblock && ! variable_size && arg->stack) + for (i = lower_bound; i < upper_bound; i++) + stack_usage_map[i] = 1; + + /* Once we have pushed something, pops can't safely + be deferred during the rest of the arguments. */ + NO_DEFER_POP; + + /* Free any temporary slots made in processing this argument. Show + that we might have taken the address of something and pushed that + as an operand. */ + preserve_temp_slots (NULL_RTX); + free_temp_slots (); + pop_temp_slots (); + + return 0; +} + +static void +determine_order(int *order, int num_actuals) +{ + int i; + for (i=0; iargs.internal_arg_pointer) + i = 0; + else if (GET_CODE (addr) == PLUS + && XEXP (addr, 0) == crtl->args.internal_arg_pointer + && GET_CODE (XEXP (addr, 1)) == CONST_INT) + i = INTVAL (XEXP (addr, 1)); + else if (GET_CODE (addr) == PLUS + && GET_CODE (XEXP (addr, 0)) == CONST_INT + && XEXP (addr, 1) == crtl->args.internal_arg_pointer ) + i = INTVAL (XEXP (addr, 0)); + else + return -1; + + return i; +} + diff -r c156f1bd5cd9 -r d0e37615691e gcc/cbc-tree-debug.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/cbc-tree-debug.c Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,49 @@ +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "tree.h" +#include "c-tree.h" + + +tree +_TREE_TYPE (tree t) +{ + return TREE_TYPE (t); +} + +enum tree_code +_TREE_CODE (tree t) +{ + return TREE_CODE (t); +} + +tree +_TREE_CHAIN (tree t) +{ + return TREE_CHAIN (t); +} + +tree +_DECL_NAME (tree t) +{ + return DECL_NAME (t); +} + +tree +_CALL_EXPR_FN (tree t) +{ + return CALL_EXPR_FN (t); +} + +tree +_CALL_EXPR_ARGS (tree t) +{ + return CALL_EXPR_ARGS (t); +} + +tree +_CALL_EXPR_ARG (tree t, int i) +{ + return CALL_EXPR_ARG (t, i); +} diff -r c156f1bd5cd9 -r d0e37615691e gcc/cbc-tree.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/cbc-tree.h Sun Feb 07 18:30:10 2010 +0900 @@ -0,0 +1,20 @@ + +//#define CbC_PRETENDED_STACK_SIZE 256 +#define CbC_PRETENDED_STACK_SIZE 1024 + + + +/* Set if the fntype is code segment on CbC language. */ +// flag3,5,6 has been used by c-tree.h +#define CbC_IS_CODE_SEGMENT(TYPE) TYPE_LANG_FLAG_5 ( FUNCTION_TYPE_CHECK(TYPE)) + +/* Set if the CALL_EXPR NODE is goto statement on CbC language. */ +#define CbC_IS_CbC_GOTO(NODE) TREE_LANG_FLAG_5 (CALL_EXPR_CHECK(NODE)) +#define CALL_EXPR_CbC_GOTO(NODE) TREE_LANG_FLAG_5 (CALL_EXPR_CHECK(NODE)) + +extern tree cbc_return_f; +extern tree cbc_env; +extern location_t cbc_return; + + + diff -r c156f1bd5cd9 -r d0e37615691e gcc/cfgexpand.c --- a/gcc/cfgexpand.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/cfgexpand.c Sun Feb 07 18:30:10 2010 +0900 @@ -42,6 +42,9 @@ #include "tree-inline.h" #include "value-prof.h" #include "target.h" +#ifndef noCbC +#include "cbc-tree.h" +#endif /* Return an expression tree corresponding to the RHS of GIMPLE @@ -235,6 +238,9 @@ CALL_FROM_THUNK_P (t) = gimple_call_from_thunk_p (stmt); CALL_CANNOT_INLINE_P (t) = gimple_call_cannot_inline_p (stmt); CALL_EXPR_VA_ARG_PACK (t) = gimple_call_va_arg_pack_p (stmt); +#ifndef noCbC + CALL_EXPR_CbC_GOTO (t) = gimple_call_cbc_goto_p (stmt); +#endif /* If the call has a LHS then create a MODIFY_EXPR to hold it. */ { diff -r c156f1bd5cd9 -r d0e37615691e gcc/config.in --- a/gcc/config.in Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/config.in Sun Feb 07 18:30:10 2010 +0900 @@ -101,13 +101,6 @@ #endif -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#ifndef USED_FOR_TARGET -#undef ENABLE_NLS -#endif - - /* Define if you want all operations on RTL (the basic data structure of the optimizer and back end) to be checked for dynamic type safety at runtime. This is quite expensive. */ @@ -924,12 +917,6 @@ #endif -/* Define if _Unwind_GetIPInfo is available. */ -#ifndef USED_FOR_TARGET -#undef HAVE_GETIPINFO -#endif - - /* Define to 1 if you have the `getrlimit' function. */ #ifndef USED_FOR_TARGET #undef HAVE_GETRLIMIT @@ -960,7 +947,7 @@ #endif -/* Define if you have the iconv() function. */ +/* Define if you have the iconv() function and it works. */ #ifndef USED_FOR_TARGET #undef HAVE_ICONV #endif @@ -1002,12 +989,6 @@ #endif -/* Define if your file defines LC_MESSAGES. */ -#ifndef USED_FOR_TARGET -#undef HAVE_LC_MESSAGES -#endif - - /* Define to 1 if you have the header file. */ #ifndef USED_FOR_TARGET #undef HAVE_LDFCN_H @@ -1356,13 +1337,6 @@ #endif -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#ifndef USED_FOR_TARGET -#undef LT_OBJDIR -#endif - - /* Define if host mkdir takes a single argument. */ #ifndef USED_FOR_TARGET #undef MKDIR_TAKES_ONE_ARG @@ -1459,12 +1433,6 @@ #endif -/* Define if you can safely include both and . */ -#ifndef USED_FOR_TARGET -#undef STRING_WITH_STRINGS -#endif - - /* Define if TFmode long double should be the default */ #ifndef USED_FOR_TARGET #undef TARGET_DEFAULT_LONG_DOUBLE_128 @@ -1512,47 +1480,6 @@ #endif -/* Define to 1 if on MINIX. */ -#ifndef USED_FOR_TARGET -#undef _MINIX -#endif - - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#ifndef USED_FOR_TARGET -#undef _POSIX_1_SOURCE -#endif - - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#ifndef USED_FOR_TARGET -#undef _POSIX_SOURCE -#endif - - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - /* Define to `char *' if does not define. */ #ifndef USED_FOR_TARGET #undef caddr_t diff -r c156f1bd5cd9 -r d0e37615691e gcc/config/i386/i386.c --- a/gcc/config/i386/i386.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/config/i386/i386.c Sun Feb 07 18:30:10 2010 +0900 @@ -18791,6 +18791,18 @@ fnaddr = gen_rtx_MEM (QImode, fnaddr); } +#ifndef noCbC + if (pop + && sibcall + && !( GET_CODE (fnaddr) == MEM + && GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF) ) + { + rtx eax = gen_rtx_REG (Pmode, AX_REG); + eax = copy_to_suggested_reg (XEXP (fnaddr, 0), eax, Pmode); + fnaddr = gen_rtx_MEM (QImode, eax); + } +#endif + call = gen_rtx_CALL (VOIDmode, fnaddr, callarg1); if (retval) call = gen_rtx_SET (VOIDmode, retval, call); diff -r c156f1bd5cd9 -r d0e37615691e gcc/config/i386/i386.md --- a/gcc/config/i386/i386.md Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/config/i386/i386.md Sun Feb 07 18:30:10 2010 +0900 @@ -15017,6 +15017,18 @@ DONE; }) +(define_expand "sibcall_pop" + [(parallel [(call (match_operand:QI 0 "" "") + (match_operand:SI 1 "" "")) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 3 "" "")))])] + "" +{ + ix86_expand_call (NULL, operands[0], operands[1], operands[2], operands[3], 1); + DONE; +}) + (define_insn "*call_0" [(call (mem:QI (match_operand 0 "constant_call_address_operand" "")) (match_operand 1 "" ""))] @@ -15140,6 +15152,21 @@ DONE; }) +(define_expand "sibcall_value_pop" + [(parallel [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "" "") + (match_operand:SI 2 "" ""))) + (set (reg:SI SP_REG) + (plus:SI (reg:SI SP_REG) + (match_operand:SI 4 "" "")))])] + "!TARGET_64BIT" +{ + ix86_expand_call (operands[0], operands[1], operands[2], + operands[3], operands[4], 1); + DONE; +}) + + ;; Call subroutine returning any type. (define_expand "untyped_call" diff -r c156f1bd5cd9 -r d0e37615691e gcc/config/rs6000/rs6000.md --- a/gcc/config/rs6000/rs6000.md Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/config/rs6000/rs6000.md Sun Feb 07 18:30:10 2010 +0900 @@ -11681,6 +11681,35 @@ [(set_attr "type" "branch,branch") (set_attr "length" "4,8")]) + +;; added by kent. +;; for indirect sibcalls of Continuation based C. +;; this is based on call_indirect_nonlocal_sysv" +(define_insn "*sibcall_indirect_nonlocal_sysv" + [(call (mem:SI (match_operand:P 0 "register_operand" "c,*l,c,*l")) + (match_operand 1 "" "g,g,g,g")) + (use (match_operand:SI 2 "immediate_operand" "O,O,n,n")) + (use (reg:SI LR_REGNO)) + (return)] + "DEFAULT_ABI == ABI_V4 + || DEFAULT_ABI == ABI_DARWIN" +{ + /* + if (INTVAL (operands[2]) & CALL_V4_SET_FP_ARGS) + output_asm_insn ("crxor 6,6,6", operands); + + else if (INTVAL (operands[2]) & CALL_V4_CLEAR_FP_ARGS) + output_asm_insn ("creqv 6,6,6", operands); + */ + + return "b%T0"; +} + [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg") + (set_attr "length" "4,4,8,8")]) + + + + (define_expand "sibcall_value" [(parallel [(set (match_operand 0 "register_operand" "") (call (mem:SI (match_operand 1 "address_operand" "")) diff -r c156f1bd5cd9 -r d0e37615691e gcc/configure --- a/gcc/configure Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/configure Sun Feb 07 18:30:10 2010 +0900 @@ -458,7 +458,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn strict_warn warn_cflags nocommon_flag TREEBROWSER MACROFUNC valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump gcc_cv_readelf libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' ac_pwd=`pwd` @@ -7314,6 +7314,7 @@ rtlflag) ac_rtlflag_checking=1 ;; runtime) ac_runtime_checking=1 ;; tree) ac_tree_checking=1 ;; + macrofunc) ac_macrofunc_checking=1 ;; types) ac_types_checking=1 ;; valgrind) ac_valgrind_checking=1 ;; *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 @@ -7370,6 +7371,14 @@ TREEBROWSER=tree-browser.o fi +if test x$ac_macrofunc_checking != x ; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_TREE_CHECKING 1 +_ACEOF + + MACROFUNC=cbc-tree-debug.o +fi if test x$ac_types_checking != x ; then cat >>confdefs.h <<\_ACEOF @@ -7378,6 +7387,7 @@ fi + if test x$ac_rtl_checking != x ; then cat >>confdefs.h <<\_ACEOF @@ -14509,13 +14519,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:14512: $ac_compile\"" >&5) + (eval echo "\"\$as_me:14522: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:14515: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:14525: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:14518: output\"" >&5) + (eval echo "\"\$as_me:14528: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -15672,7 +15682,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 15675 "configure"' > conftest.$ac_ext + echo '#line 15685 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16971,11 +16981,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16974: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16984: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16978: \$? = $ac_status" >&5 + echo "$as_me:16988: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17310,11 +17320,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17313: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17323: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17317: \$? = $ac_status" >&5 + echo "$as_me:17327: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17415,11 +17425,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17418: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17428: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17422: \$? = $ac_status" >&5 + echo "$as_me:17432: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17470,11 +17480,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17473: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17483: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17477: \$? = $ac_status" >&5 + echo "$as_me:17487: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20282,7 +20292,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20285 "configure" +#line 20295 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -20378,7 +20388,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20381 "configure" +#line 20391 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -25512,6 +25522,7 @@ s,@warn_cflags@,$warn_cflags,;t t s,@nocommon_flag@,$nocommon_flag,;t t s,@TREEBROWSER@,$TREEBROWSER,;t t +s,@MACROFUNC@,$MACROFUNC,;t t s,@valgrind_path@,$valgrind_path,;t t s,@valgrind_path_defines@,$valgrind_path_defines,;t t s,@valgrind_command@,$valgrind_command,;t t diff -r c156f1bd5cd9 -r d0e37615691e gcc/configure.ac --- a/gcc/configure.ac Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/configure.ac Sun Feb 07 18:30:10 2010 +0900 @@ -403,6 +403,7 @@ rtlflag) ac_rtlflag_checking=1 ;; runtime) ac_runtime_checking=1 ;; tree) ac_tree_checking=1 ;; + macrofunc) ac_macrofunc_checking=1 ;; types) ac_types_checking=1 ;; valgrind) ac_valgrind_checking=1 ;; *) AC_MSG_ERROR(unknown check category $check) ;; @@ -446,6 +447,12 @@ ]) TREEBROWSER=tree-browser.o fi +if test x$ac_macrofunc_checking != x ; then + AC_DEFINE(ENABLE_TREE_CHECKING, 1, +[Define if you want all operations on trees (the basic data + ]) + MACROFUNC=cbc-tree-debug.o +fi if test x$ac_types_checking != x ; then AC_DEFINE(ENABLE_TYPES_CHECKING, 1, [Define if you want all gimple types to be verified after gimplifiation. @@ -453,6 +460,7 @@ ]) fi AC_SUBST(TREEBROWSER) +AC_SUBST(MACROFUNC) if test x$ac_rtl_checking != x ; then AC_DEFINE(ENABLE_RTL_CHECKING, 1, [Define if you want all operations on RTL (the basic data structure diff -r c156f1bd5cd9 -r d0e37615691e gcc/function.c --- a/gcc/function.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/function.c Sun Feb 07 18:30:10 2010 +0900 @@ -3244,6 +3244,11 @@ SET_DECL_RTL (result, x); } +#ifndef noCbC + //if (CbC_IS_CODE_SEGMENT(TREE_TYPE(fndecl)) ) + //all.stack_args_size.constant = CbC_STACK_SIZE; +#endif + /* We have aligned all the args, so add space for the pretend args. */ crtl->args.pretend_args_size = all.pretend_args_size; all.stack_args_size.constant += all.extra_pretend_bytes; diff -r c156f1bd5cd9 -r d0e37615691e gcc/gcc.c --- a/gcc/gcc.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/gcc.c Sun Feb 07 18:30:10 2010 +0900 @@ -988,6 +988,9 @@ {".zip", "#Java", 0, 0, 0}, {".jar", "#Java", 0, 0, 0}, /* Next come the entries for C. */ {".c", "@c", 0, 1, 1}, +#ifndef noCbC + {".cbc", "@c", 0, 1, 1}, +#endif {"@c", /* cc1 has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps is given. */ diff -r c156f1bd5cd9 -r d0e37615691e gcc/gimple.c --- a/gcc/gimple.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/gimple.c Sun Feb 07 18:30:10 2010 +0900 @@ -33,6 +33,9 @@ #include "tree-flow.h" #include "value-prof.h" #include "flags.h" +#ifndef noCbC +#include "cbc-tree.h" +#endif #define DEFGSCODE(SYM, NAME, STRUCT) NAME, const char *const gimple_code_name[] = { @@ -360,6 +363,9 @@ gimple_call_set_return_slot_opt (call, CALL_EXPR_RETURN_SLOT_OPT (t)); gimple_call_set_from_thunk (call, CALL_FROM_THUNK_P (t)); gimple_call_set_va_arg_pack (call, CALL_EXPR_VA_ARG_PACK (t)); +#ifndef noCbC + gimple_call_set_cbc_goto (call, CALL_EXPR_CbC_GOTO (t)); +#endif return call; } @@ -3188,6 +3194,9 @@ gimple_call_set_return_slot_opt (new_stmt, gimple_call_return_slot_opt_p (stmt)); gimple_call_set_from_thunk (new_stmt, gimple_call_from_thunk_p (stmt)); gimple_call_set_va_arg_pack (new_stmt, gimple_call_va_arg_pack_p (stmt)); +#ifndef noCbC + gimple_call_set_cbc_goto (new_stmt, gimple_call_cbc_goto_p (stmt)); +#endif return new_stmt; } diff -r c156f1bd5cd9 -r d0e37615691e gcc/gimple.h --- a/gcc/gimple.h Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/gimple.h Sun Feb 07 18:30:10 2010 +0900 @@ -101,6 +101,9 @@ GF_CALL_RETURN_SLOT_OPT = 1 << 2, GF_CALL_TAILCALL = 1 << 3, GF_CALL_VA_ARG_PACK = 1 << 4, +#ifndef noCbC + GF_CALL_CBC_GOTO = 1 << 5, +#endif GF_OMP_PARALLEL_COMBINED = 1 << 0, /* True on an GIMPLE_OMP_RETURN statement if the return does not require @@ -2059,6 +2062,21 @@ s->gsbase.subcode &= ~GF_CALL_TAILCALL; } +#ifndef noCbC +/* If CBCGOTO_P is true, mark call statement S as being a cbc goto + (i.e., a call just before the exit of a function). These calls are + candidate for tail call optimization. */ + +static inline void +gimple_call_set_cbc_goto (gimple s, bool cbcgoto_p) +{ + GIMPLE_CHECK (s, GIMPLE_CALL); + if (cbcgoto_p) + s->gsbase.subcode |= GF_CALL_CBC_GOTO; + else + s->gsbase.subcode &= ~GF_CALL_CBC_GOTO; +} +#endif /* Return true if GIMPLE_CALL S is marked as a tail call. */ @@ -2069,6 +2087,16 @@ return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0; } +#ifndef noCbC +/* Return true if GIMPLE_CALL S is marked as a cbc goto. */ + +static inline bool +gimple_call_cbc_goto_p (gimple s) +{ + GIMPLE_CHECK (s, GIMPLE_CALL); + return (s->gsbase.subcode & GF_CALL_CBC_GOTO) != 0; +} +#endif /* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */ diff -r c156f1bd5cd9 -r d0e37615691e gcc/gimplify.c --- a/gcc/gimplify.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/gimplify.c Sun Feb 07 18:30:10 2010 +0900 @@ -52,6 +52,10 @@ #include "splay-tree.h" #include "vec.h" #include "gimple.h" +#ifndef noCbC +#include "cbc-tree.h" +#endif + enum gimplify_omp_var_data @@ -1329,7 +1333,16 @@ return GS_ALL_DONE; } - if (VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl)))) + if (VOID_TYPE_P (TREE_TYPE (TREE_TYPE (current_function_decl))) +#ifndef noCbC + || ( ret_expr + && TREE_CODE(ret_expr)==CALL_EXPR + && CbC_IS_CbC_GOTO(ret_expr) + //&& !CbC_IS_CODE_SEGMENT(TREE_TYPE(current_function_decl))) + && !(current_function_decl&&CbC_IS_CODE_SEGMENT(TREE_TYPE(current_function_decl)))) + //&& !(current_function_decl&&CbC_IS_CODE_SEGMENT(current_function_decl))) +#endif + ) result_decl = NULL_TREE; else { diff -r c156f1bd5cd9 -r d0e37615691e gcc/passes.c --- a/gcc/passes.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/passes.c Sun Feb 07 18:30:10 2010 +0900 @@ -518,7 +518,11 @@ NEXT_PASS (pass_build_cfg); NEXT_PASS (pass_lower_complex_O0); NEXT_PASS (pass_lower_vector); +#ifndef noCbC + //NEXT_PASS (pass_warn_function_return); +#else NEXT_PASS (pass_warn_function_return); +#endif NEXT_PASS (pass_build_cgraph_edges); NEXT_PASS (pass_inline_parameters); *p = NULL; diff -r c156f1bd5cd9 -r d0e37615691e gcc/tree-ssa-operands.c --- a/gcc/tree-ssa-operands.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/tree-ssa-operands.c Sun Feb 07 18:30:10 2010 +0900 @@ -34,6 +34,9 @@ #include "toplev.h" #include "langhooks.h" #include "ipa-reference.h" +#ifndef noCbC + #include "cbc-tree.h" +#endif /* This file contains the code required to manage the operands cache of the SSA optimizer. For every stmt, we maintain an operand cache in the stmt diff -r c156f1bd5cd9 -r d0e37615691e gcc/tree.c --- a/gcc/tree.c Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/tree.c Sun Feb 07 18:30:10 2010 +0900 @@ -90,6 +90,10 @@ #undef DEFTREECODE #undef END_OF_BASE_TREE_CODES +#ifndef noCbC +#include "cbc-tree.h" +#endif + /* Each tree code class has an associated string representation. These must correspond to the tree_code_class entries. */ @@ -5817,6 +5821,28 @@ return type; } +#ifndef noCbC +tree +build_code_segment_type (tree value_type, tree arg_types) +{ + tree t; + hashval_t hashcode = 0; + + gcc_assert (TREE_CODE (value_type) == VOID_TYPE); + + /* Make a node of the sort we want. */ + t = make_node (FUNCTION_TYPE); + TREE_TYPE (t) = value_type; + TYPE_ARG_TYPES (t) = arg_types; + + CbC_IS_CODE_SEGMENT (t) = 1; + + if (!COMPLETE_TYPE_P (t)) + layout_type (t); + return t; +} +#endif + /* Computes the canonical argument types from the argument type list ARGTYPES. diff -r c156f1bd5cd9 -r d0e37615691e gcc/tree.h --- a/gcc/tree.h Sun Feb 07 18:28:00 2010 +0900 +++ b/gcc/tree.h Sun Feb 07 18:30:10 2010 +0900 @@ -4017,6 +4017,9 @@ extern tree value_member (tree, tree); extern tree purpose_member (const_tree, tree); +#ifndef noCbC +extern tree build_code_segment_type (tree, tree); +#endif extern int attribute_list_equal (const_tree, const_tree); extern int attribute_list_contained (const_tree, const_tree); extern int tree_int_cst_equal (const_tree, const_tree);