https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002
Bug ID: 108002 Summary: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pefy19950714 at gmail dot com Target Milestone: --- I got below exception when I was compiling zstd libraries with any g++ optimization options(O1, O2, O3, etc). But, the compilation can be passed if I remove the optimization option. ------------------------- .//src/extern/zstd/src/zstd.c: In function ‘ZSTD_bounds ZSTD_cParam_getBounds(ZSTD_cParameter)’: .//src/extern/zstd/src/zstd.c:18062: internal compiler error: in tree_nrv, at tree-nrv.c:143 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ------------------------- There are some required information for your reference with gcc -v. We are using redhat-release-5Client-5.9.0.2. ------------------------- Using built-in specs. Target: x86_64-redhat-linux Configured with: ../gcc-4.4.3/configure --prefix=/mu/dev/gcc/4.4.3-rhel5-64 --with-local-prefix=/mu/mtsdk/corplib/gcc443-rhel5-64 --with-as=/mu/bin/gas --with-ar=/mu/bin/gar --with-ld=/mu/bin/gld --with-nm=/mu/bin/gnm --enable-bootstrap --enable-targets=x86_64,i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.3 (GCC) ------------------------- The command we used to compile zstd lib: g++ -O3 zstd.c -c -o zstd.o ------------------------- ZSTD lib can be downloaded from here: https://github.com/facebook/zstd ------------------------- Thanks for your help, and hope I can get the updates soon!