This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, The attached proposed patchlet fixes PR24783. We tried to resolve an implicit type from the wrong namespace. I'd be glad if somebody would carefully look if this is the proper thing to do there. If found to be the proper thing to do, is this ok for trunk and 4.2? fortran/ChangeLog 2006-11-14 Bernhard Fischer <> PR fortran/24783 * resolve.c (resolve_variable): Get the implicit type from the symbols namespace rather than the default namespace. Fix whitespace. (resolve_formal_arglist, resolve_equivalence): Fix typo. testsuite/ChangeLog 2006-11-14 Bernhard Fischer <> PR fortran/24783 * gfortran.dg/implicit_10.f90: New test. PS: Without the patch, we tried to use ns == 0 thus ignored the implicit types from the namespace the symbol happened to be in (as stored in sym->ns): (gdb) run Starting program: /opt/x86_64/gcc-4.3.orig/lib/gcc/x86_64-linux-gnu/4.3.0/f951 pr24783.f90 -quiet -dumpbase pr24783.f90 -mtune=generic -auxbase pr24783 -W -Wall -version -fbounds-check -I /opt/x86_64/gcc-4.3.orig/bin/../lib/gcc/x86_64-linux-gnu/4.3.0/finclude -o /tmp/ccGI5aKj.s GNU F95 version 4.3.0 20061113 (experimental) (x86_64-linux-gnu) compiled by GNU C version 4.3.0 20061113 (experimental). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Breakpoint 2, gfc_set_default_type (sym=0xdfae50, error_flag=1, ns=0xdfa890) at ../../../src/gcc-4.3.orig/gcc/fortran/symbol.c:224 224 if (sym->ts.type != BT_UNKNOWN) (gdb) c Continuing. Breakpoint 2, gfc_set_default_type (sym=0xdfaf30, error_flag=1, ns=0x0) at ../../../src/gcc-4.3.orig/gcc/fortran/symbol.c:224 224 if (sym->ts.type != BT_UNKNOWN) (gdb) c Continuing. pr24783.f90:7: SUBROUTINE sub(vec, ny) 1 Error: Symbol 'ny' at (1) has no IMPLICIT type Breakpoint 2, gfc_set_default_type (sym=0xdfaf30, error_flag=1, ns=0xdfa890) at ../../../src/gcc-4.3.orig/gcc/fortran/symbol.c:224 224 if (sym->ts.type != BT_UNKNOWN) (gdb)
Attachment:
gcc.gfortran-4.3.pr24783.00.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |