[Bug fortran/40994] ICE in gfc_undo_symbols

2010-08-11 Thread janus at gcc dot gnu dot org


--- Comment #8 from janus at gcc dot gnu dot org  2010-08-11 19:30 ---
Both comment #0 and comment #6 work for me without ICE on 4.6 trunk r163095.
Closing as fixed.


-- 

janus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to fail|4.4.1 4.5.0 4.6.0   |4.4.1 4.5.0
  Known to work||4.6.0
 Resolution||FIXED


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



[Bug fortran/40994] ICE in gfc_undo_symbols

2010-07-26 Thread dominiq at lps dot ens dot fr


--- Comment #7 from dominiq at lps dot ens dot fr  2010-07-26 13:30 ---
This pr looks like a duplicate of pr37744, or at least the ICEs disappear with
-fwhole-file (now the default: see
http://gcc.gnu.org/ml/gcc-bugs/2010-07/msg02853.html#c9 ).


-- 


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



[Bug fortran/40994] ICE in gfc_undo_symbols

2010-05-07 Thread dfranke at gcc dot gnu dot org


--- Comment #6 from dfranke at gcc dot gnu dot org  2010-05-07 22:09 ---
Not related to ISO-C.

Reduced test case:
MODULE f03_test
 INTERFACE
INTEGER FUNCTION build(lib, np)
END FUNCTION
 END INTERFACE
 PROCEDURE(build), POINTER :: pbuild
CONTAINS
   ! simply generate any error
END MODULE f03_test

end


dan...@silence:~/pr$ valgrind
/home/daniel/i686-pc-linux-gnu/gcc/libexec/gcc/i686-pc-linux-gnu/4.6.0/f951
pr40994.f90
==20641== Memcheck, a memory error detector
==20641== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==20641== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
copyright info
==20641== Command:
/home/daniel/i686-pc-linux-gnu/gcc/libexec/gcc/i686-pc-linux-gnu/4.6.0/f951
pr40994.f90
==20641== 
pr40994.f90:10.50:

 SUBROUTINE test_bind_c BIND(C,name=test_bind_c)
  1
Error: Missing required parentheses before BIND(C) at (1)
pr40994.f90:11.4:

 END SUBROUTINE test_bind_c
1
Error: Expecting END MODULE statement at (1)
pr40994.f90:4.30-26:

INTEGER FUNCTION build(lib, np) BIND(C)
  2   1
Warning: Implicitly declared variable 'lib' at (1) may not be C interoperable
but it is a dummy argument to the BIND(C) procedure 'build' at (2)
pr40994.f90:4.34-26:

INTEGER FUNCTION build(lib, np) BIND(C)
  2   1
Warning: Implicitly declared variable 'np' at (1) may not be C interoperable
but it is a dummy argument to the BIND(C) procedure 'build' at (2)
pr40994.f90:4.26:

INTEGER FUNCTION build(lib, np) BIND(C)
  1
Warning: Variable 'build' at (1) may not be a C interoperable kind but it is
bind(c)
==20641== Invalid read of size 4
==20641==at 0x81578A2: gfc_undo_symbols (symbol.c:2813)
==20641==by 0x8125CE6: decode_statement (parse.c:271)
==20641==by 0x81277D0: next_free (parse.c:722)
==20641==by 0x8127BB9: next_statement (parse.c:907)
==20641==by 0x812BD8D: gfc_parse_file (parse.c:4220)
==20641==by 0x8167059: gfc_be_parse_file (f95-lang.c:239)
==20641==by 0x8481F2A: compile_file (toplev.c:1053)
==20641==by 0x4131BD5: (below main) (libc-start.c:226)
==20641==  Address 0x430a910 is 136 bytes inside a block of size 296 free'd
==20641==at 0x4024B3A: free (vg_replace_malloc.c:366)
==20641==by 0x815710F: gfc_free_symbol (symbol.c:2485)
==20641==by 0x8157FEF: free_sym_tree (symbol.c:3087)
==20641==by 0x81582AD: gfc_free_namespace (symbol.c:3231)
==20641==by 0x81570C7: gfc_free_symbol (symbol.c:2476)
==20641==by 0x8157FEF: free_sym_tree (symbol.c:3087)
==20641==by 0x8157F5B: free_sym_tree (symbol.c:3068)
==20641==by 0x8157F5B: free_sym_tree (symbol.c:3068)
==20641==by 0x8157F5B: free_sym_tree (symbol.c:3068)
==20641==by 0x8157F5B: free_sym_tree (symbol.c:3068)
==20641==by 0x8157F5B: free_sym_tree (symbol.c:3068)
==20641==by 0x81582AD: gfc_free_namespace (symbol.c:3231)
[...]


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu dot
   ||org
OtherBugsDependingO|32630   |
  nThis||
   Keywords||error-recovery, ice-on-
   ||invalid-code
  Known to fail|4.4.1 4.5.0 |4.4.1 4.5.0 4.6.0
Summary|ICE with BIND(C)|ICE in gfc_undo_symbols


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