[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2013-01-29 Thread mikael at gcc dot gnu.org


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



Mikael Morin mikael at gcc dot gnu.org changed:



   What|Removed |Added



 CC||jkrahn at nc dot rr.com



--- Comment #9 from Mikael Morin mikael at gcc dot gnu.org 2013-01-29 
12:43:13 UTC ---

*** Bug 44830 has been marked as a duplicate of this bug. ***


[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2013-01-28 Thread mikael at gcc dot gnu.org


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



--- Comment #7 from Mikael Morin mikael at gcc dot gnu.org 2013-01-28 
14:37:26 UTC ---

Author: mikael

Date: Mon Jan 28 14:37:20 2013

New Revision: 195506



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=195506

Log:

2013-01-28  Tobias Burnus  bur...@net-b.de

Mikael Morin  mik...@gcc.gnu.org



PR fortran/53537

* symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an

interface block.

(gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.

* decl.c (gfc_match_data_decl): Ditto.

(variable_decl): Remove undeclared type error.

(gfc_match_import): Use renamed instead of original name.



2013-01-28  Tobias Burnus  bur...@net-b.de

Mikael Morin  mik...@gcc.gnu.org



PR fortran/53537

* gfortran.dg/import2.f90: Adjust undeclared type error messages.

* gfortran.dg/import8.f90: Likewise.

* gfortran.dg/interface_derived_type_1.f90: Likewise.

* gfortran.dg/import10.f90: New test.

* gfortran.dg/import11.f90: Likewise





Added:

trunk/gcc/testsuite/gfortran.dg/import10.f90

trunk/gcc/testsuite/gfortran.dg/import11.f90

Modified:

trunk/gcc/fortran/ChangeLog

trunk/gcc/fortran/decl.c

trunk/gcc/fortran/symbol.c

trunk/gcc/testsuite/ChangeLog

trunk/gcc/testsuite/gfortran.dg/import2.f90

trunk/gcc/testsuite/gfortran.dg/import8.f90

trunk/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90


[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2013-01-28 Thread dominiq at lps dot ens.fr


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



--- Comment #8 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-01-28 
20:08:50 UTC ---

After revision 195506, the test in pr44830 compiles without error.


[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2013-01-15 Thread mikael at gcc dot gnu.org


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



Mikael Morin mikael at gcc dot gnu.org changed:



   What|Removed |Added



 CC||mikael at gcc dot gnu.org



--- Comment #6 from Mikael Morin mikael at gcc dot gnu.org 2013-01-15 
17:49:45 UTC ---

Patch submitted:

http://gcc.gnu.org/ml/gcc-patches/2013-01/msg00545.html


[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2013-01-09 Thread mikael at gcc dot gnu.org


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



--- Comment #5 from Mikael Morin mikael at gcc dot gnu.org 2013-01-09 
13:54:15 UTC ---

Created attachment 29124

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29124

Fix for the regression in comment #3



For the remaining problem:



(In reply to comment #3)

 The patch of comment 1 fails for testsuite/gfortran.dg/import7.f90:

 

  TYPE(T3) X

1

   Error: The type of 'x' at (1) has not been declared within the interface



maybe we can just remove the error. After all, there is already

non-interface-specific code to diagnose uses of undeclared types.

For that code to trigger in place of the error above, a few adjustments are

needed to avoid searching the type outside the interface (so that the type is

really not found).



With the attached patch, comment #0, comment #1 and comment #4 are accepted,

but a few adjustments are needed in the testsuite:

from:



type(fcnparms) :: fparams ! { dg-error not been declared within the in

 1

Error: The type of 'fparams' at (1) has not been declared within the interface



to:



type(fcnparms) :: fparams ! { dg-error not been declared within the in

  1

Error: Derived type 'fcnparms' at (1) is being used before it is defined





I will test the patch against the full testsuite.  As it touches the core of

the symbol resolution, it's quite to be expected that it has interesting side

effects.


[Bug fortran/53537] [4.6/4.7/4.8 Regression] Explicit IMPORT of renamed USE-associated symbol fails

2012-07-02 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53537

Richard Guenther rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|4.5.4   |4.6.4