[Bug c/54428] New: ICE in gimplify_expr, at gimplify.c:7591
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54428 Bug #: 54428 Summary: ICE in gimplify_expr, at gimplify.c:7591 Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: kyle.nieme...@gmail.com Created attachment 28108 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28108 preprocessed file I get the compiler error "internal compiler error: in gimplify_expr, at gimplify.c:7591" on the line: rt[i] = f[i] - s_val * cpow(w[i], K) * b[i]; System information: -gcc version: GNU C (GCC) version 4.7.1 (x86_64-apple-darwin12.0.0) -system type: x86_64-apple-darwin12.0.0 -gcc build options: ../configure --enable-languages=c,c++,fortran --prefix=/usr/local/Cellar/gcc/4.7.1/gcc --datarootdir=/usr/local/Cellar/gcc/4.7.1/share --bindir=/usr/local/Cellar/gcc/4.7.1/bin --program-suffix=-4.7 --with-gmp=/usr/local/Cellar/gmp/5.0.5 --with-mpfr=/usr/local/Cellar/mpfr/3.1.1 --with-mpc=/usr/local/Cellar/libmpc/1.0 --with-system-zlib --enable-stage1-checking --enable-plugin --enable-lto --disable-multilib --disable-nls -command: gcc -c -o obj/cf.o cf.c -O0 -g3 -fbounds-check -Wunused-variable -Wunused-parameter -Wall -pedantic -ftree-vrp -std=c99 -Wextra -fno-strict-aliasing -fwrapv -v -save-temps -I. -compiler output: cf.c: In function 'cf': cf.c:290:30: internal compiler error: in gimplify_expr, at gimplify.c:7591 I've attached the preprocessed file cf.i. Strangely, when compiled with "gcc -c -o obj/cf.o cf.c -O3 -ffast-math -std=c99 -I.", there is no error (and the results are correct).
[Bug fortran/55696] New: Error linking using gfortran with C++ code compiled with -std=c++11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55696 Bug #: 55696 Summary: Error linking using gfortran with C++ code compiled with -std=c++11 Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: kyle.nieme...@gmail.com Created attachment 28968 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28968 main.f90 holds Fortran program that calls C++ subroutine in sub.cpp I'm running into a linker error when mixing Fortran 90 code with C++ code compiled using "-std=c++11". The attached code compiles and links fine with: gfortran -c main.f90 g++ -c sub.cpp gfortran -o prog main.o sub.o -lstdc++ But, if I compile the C++ code with: g++ -c sub.cpp -std=c++11 then linking fails with the error: Undefined symbols for architecture x86_64: "std::basic_string, std::allocator >::basic_string(std::basic_string, std::allocator >&&)", referenced from: __ZN9__gnu_cxx13new_allocatorISsE9constructISsISsEEEvPT_DpOT0_ in sub.o __ZSt10_ConstructISsISsEEvPT_DpOT0_ in sub.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status I'm using gfortran and g++ 4.7.2.
[Bug libstdc++/55696] Error linking using gfortran with C++ code compiled with -std=c++11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55696 --- Comment #2 from Kyle 2012-12-14 21:17:07 UTC --- I used homebrew (on Mac OS X 10.8.2). "gcc -v" reports: Using built-in specs. COLLECT_GCC=/usr/local/bin/gcc-4.7 COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.7.2/gcc/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/lto-wrapper Target: x86_64-apple-darwin12.2.0 Configured with: ../configure --enable-languages=c,c++,fortran --prefix=/usr/local/Cellar/gcc/4.7.2/gcc --datarootdir=/usr/local/Cellar/gcc/4.7.2/share --bindir=/usr/local/Cellar/gcc/4.7.2/bin --program-suffix=-4.7 --with-gmp=/usr/local/Cellar/gmp/5.0.5 --with-mpfr=/usr/local/Cellar/mpfr/3.1.1-p2 --with-mpc=/usr/local/Cellar/libmpc/1.0.1 --with-system-zlib --enable-stage1-checking --enable-plugin --enable-lto --disable-nls --disable-multilib Thread model: posix gcc version 4.7.2 (GCC) and "gfortran -v" reports: Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/usr/local/Cellar/gfortran/4.7.2/gfortran/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/lto-wrapper Target: x86_64-apple-darwin12.2.0 Configured with: ../configure --enable-languages=fortran --prefix=/usr/local/Cellar/gfortran/4.7.2/gfortran --datarootdir=/usr/local/Cellar/gfortran/4.7.2/share --bindir=/usr/local/Cellar/gfortran/4.7.2/bin --with-system-zlib --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --enable-checking=release --disable-stage1-checking --disable-build-poststage1-with-cxx --disable-libstdcxx-pc --disable-nls Thread model: posix gcc version 4.7.2 (GCC)
[Bug libstdc++/55696] Error linking using gfortran with C++ code compiled with -std=c++11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55696 --- Comment #4 from Kyle 2012-12-14 21:25:30 UTC --- It looks like you were right. It must have been linking to the system libstdc++, rather than the one associated with this gcc. When I link using: gfortran -o prog main.o sub.o /usr/local/Cellar/gcc/4.7.2/gcc/lib/libstdc++.a it gives no error. My fault, thanks!
[Bug fortran/66605] New: -Wunused-parameter causes internal compiler error with gfortran 5.1.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66605 Bug ID: 66605 Summary: -Wunused-parameter causes internal compiler error with gfortran 5.1.0 Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kyle.niemeyer at gmail dot com Target Milestone: --- This small module causes an ICE in gfortran 5.1.0, when compiled with the -Wunused-parameter flag: MODULE test IMPLICIT NONE INTEGER, PARAMETER :: wp = KIND(1.0D0) CONTAINS SUBROUTINE sub (neq, time, y, dydt) IMPLICIT NONE INTEGER :: neq REAL(WP) :: time, y(neq), dydt(neq) dydt(1) = 1.0 / y(1) END SUBROUTINE sub END MODULE Here are the results from "gfortran -v -save-temps -Wunused-parameter -c test.f90": Using built-in specs. COLLECT_GCC=gfortran Target: x86_64-apple-darwin14.3.0 Configured with: ../configure --build=x86_64-apple-darwin14.3.0 --prefix=/usr/local/Cellar/gcc/5.1.0 --libdir=/usr/local/Cellar/gcc/5.1.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran,java,jit --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.1.0 --with-all-languages --without-multilib' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --with-ecj-jar=/usr/local/opt/ecj/share/java/ecj.jar --disable-multilib --enable-host-shared Thread model: posix gcc version 5.1.0 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib) COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.10.3' '-v' '-save-temps' '-Wunused-parameter' '-c' '-mtune=core2' /usr/local/Cellar/gcc/5.1.0/libexec/gcc/x86_64-apple-darwin14.3.0/5.1.0/f951 test.f90 -fPIC -quiet -dumpbase test.f90 -mmacosx-version-min=10.10.3 -mtune=core2 -auxbase test -Wunused-parameter -version -fintrinsic-modules-path /usr/local/Cellar/gcc/5.1.0/lib/gcc/5/gcc/x86_64-apple-darwin14.3.0/5.1.0/finclude -o test.s GNU Fortran (Homebrew gcc 5.1.0 --with-all-languages --without-multilib) version 5.1.0 (x86_64-apple-darwin14.3.0) compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran2008 (Homebrew gcc 5.1.0 --with-all-languages --without-multilib) version 5.1.0 (x86_64-apple-darwin14.3.0) compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version 3.1.2-p11, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ' test.f90:18:0: END SUBROUTINE sub 1 in pp_format, at pretty-print.c:614 Internal compiler error: Error reporting routines re-entered. gfortran: internal compiler error: Abort trap: 6 (program f951) Please submit a full bug report, with preprocessed source if appropriate. See <https://github.com/Homebrew/homebrew/issues> for instructions.
[Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66605 --- Comment #1 from Kyle --- I should note that removing "-Wunused-parameter" allows compilation without error.