public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37744]  New: ICE-on-invalid with ISO_C_BINDING and TYPEs
@ 2008-10-06  9:32 dennis dot wassel at googlemail dot com
  2008-10-06  9:35 ` [Bug fortran/37744] " dennis dot wassel at googlemail dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: dennis dot wassel at googlemail dot com @ 2008-10-06  9:32 UTC (permalink / raw)
  To: gcc-bugs

f951 hangs or segfaults on this invalid piece of code, after printing the
correct diagnostic message.
The example is very sensitive to changes (even comments or whitespace), causing
f951 to either hang, segfault or abort gracefully; this version provokes a
segfault. The compiler can be provoked to hang by
a) invoking gfortran -march=i686 -mtune=generic pr.F90
b) removing the _C_BOOL modifier from .FALSE.

Output is

$ gfortran -v pr.F90
Driving: gfortran -v pr.F90 -lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3.2/configure --enable-version-specific-runtime-libs
-enable-languages=c,c++,fortran --program-suffix=-4.3.2 --with-arch=core2
--with-tune=core2
Thread model: posix
gcc version 4.3.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=core2' '-march=core2'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.2/cc1 -E -lang-fortran
-traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v pr.F90 -mtune=core2 -march=core2
-o /tmp/ccY5rhzV.f95
ignoring nonexistent directory
"/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.2/include
 /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=core2' '-march=core2'
 /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.2/f951 /tmp/ccY5rhzV.f95
-ffree-form -quiet -dumpbase pr.F90 -mtune=core2 -march=core2 -auxbase pr
-version -fpreprocessed -fintrinsic-modules-path
/usr/local/lib/gcc/i686-pc-linux-gnu/4.3.2/finclude -o /tmp/ccWmyykH.s
GNU F95 (GCC) version 4.3.2 (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64448
pr.F90:22.19:

  foo%flags(trouble) = .FALSE._C_BOOL
                  1
Error: Symbol 'trouble' at (1) has no IMPLICIT type
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I plugged f951 into the debugger and it said the culprit is here:
gfc_undo_symbols () at gcc/fortran/symbol.c:2180

I cannot follow this any further myself right now.
Good hunting!


-- 
           Summary: ICE-on-invalid with ISO_C_BINDING and TYPEs
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dennis dot wassel at googlemail dot com
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37744


^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <bug-37744-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-03-04 19:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-06  9:32 [Bug fortran/37744] New: ICE-on-invalid with ISO_C_BINDING and TYPEs dennis dot wassel at googlemail dot com
2008-10-06  9:35 ` [Bug fortran/37744] " dennis dot wassel at googlemail dot com
2008-12-09 19:13 ` dfranke at gcc dot gnu dot org
2009-05-04  8:56 ` dennis dot wassel at googlemail dot com
2009-05-04  9:07 ` dominiq at lps dot ens dot fr
2009-08-13 17:05 ` dominiq at lps dot ens dot fr
2009-08-17 11:59 ` dennis dot wassel at googlemail dot com
2010-05-19 16:30 ` [Bug fortran/37744] ICE-on-invalid with ISO_C_BINDING dfranke at gcc dot gnu dot org
2010-07-13 11:37 ` dennis dot wassel at googlemail dot com
2010-07-26 13:25 ` dominiq at lps dot ens dot fr
2010-07-26 13:31 ` burnus at gcc dot gnu dot org
2010-07-26 13:45 ` dominiq at lps dot ens dot fr
2010-07-27 11:29 ` mikael at gcc dot gnu dot org
2010-07-28 12:45 ` mikael at gcc dot gnu dot org
     [not found] <bug-37744-4@http.gcc.gnu.org/bugzilla/>
2010-12-30  3:07 ` dfranke at gcc dot gnu.org
2012-03-04 19:47 ` mikael at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).