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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.15 15:13:27
                 CC|                            |janus at gcc dot gnu.org
            Summary|generic interface to        |[4.6/4.7 Regression]
                   |external function in module |generic interface to
                   |                            |external function in module
     Ever Confirmed|0                           |1

--- Comment #1 from janus at gcc dot gnu.org 2011-03-15 15:13:27 UTC ---
Confirmed. Seems to be a regression in 4.6.

At first glance your code looks completely innocent. I think the bug may be
somehow related to the interface and the result variable having the same name.
Removing (or renaming) the result variable makes the error go away.

In any case the problem seems to occur during module writing. Backtrace:

#0  0x00000000004c9fc8 in error_string (p=0xfbadac84 <Address 0xfbadac84 out of
bounds>) at /home/jweil/gcc47/trunk/gcc/fortran/error.c:132
#1  0x00000000004cafd7 in error_print (type=0x11d5508 "", format0=0x11e3a88
"write_symbol(): bad module symbol '%s'", argp=0x7fffffffd980)
    at /home/jweil/gcc47/trunk/gcc/fortran/error.c:671
#2  0x00000000004cbc56 in gfc_internal_error (format=0x11e3a88 "write_symbol():
bad module symbol '%s'") at /home/jweil/gcc47/trunk/gcc/fortran/error.c:977
#3  0x0000000000510351 in write_symbol (n=6, sym=0x1973dd0) at
/home/jweil/gcc47/trunk/gcc/fortran/module.c:4848
#4  0x0000000000510572 in write_symbol1 (p=0x1974f60) at
/home/jweil/gcc47/trunk/gcc/fortran/module.c:4933
#5  0x00000000005109b2 in write_module () at
/home/jweil/gcc47/trunk/gcc/fortran/module.c:5081
#6  0x0000000000510e23 in gfc_dump_module (name=0x7ffff7f651f0 "module_m",
dump_flag=1) at /home/jweil/gcc47/trunk/gcc/fortran/module.c:5224
#7  0x000000000051eb09 in gfc_parse_file () at
/home/jweil/gcc47/trunk/gcc/fortran/parse.c:4377
#8  0x00000000005641c4 in gfc_be_parse_file () at
/home/jweil/gcc47/trunk/gcc/fortran/f95-lang.c:250
#9  0x0000000000a56410 in compile_file () at
/home/jweil/gcc47/trunk/gcc/toplev.c:579
#10 0x0000000000a5862b in do_compile () at
/home/jweil/gcc47/trunk/gcc/toplev.c:1900
#11 0x0000000000a58778 in toplev_main (argc=2, argv=0x7fffffffddd8) at
/home/jweil/gcc47/trunk/gcc/toplev.c:1963
#12 0x00000000005fe2b4 in main (argc=2, argv=0x7fffffffddd8) at
/home/jweil/gcc47/trunk/gcc/main.c:36

Reply via email to