User account creation filtered due to spam.

Bug 37193 - [4.3/4.4 Regression] "USE mod, ONLY: i, i=>j" does not import "i"
Summary: [4.3/4.4 Regression] "USE mod, ONLY: i, i=>j" does not import "i"
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P4 normal
Target Milestone: 4.3.3
Assignee: Daniel Kraft
URL:
Keywords: rejects-valid
Depends on:
Blocks: 32834
  Show dependency treegraph
 
Reported: 2008-08-21 19:09 UTC by Tobias Burnus
Modified: 2008-09-03 12:28 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-08-30 14:21:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2008-08-21 19:09:09 UTC
The following program is valid and compiles with g95, f95, ifort, ...
with gfortran it fails with:

i = 4
1
Error: Symbol 'i' at (1) has no IMPLICIT type


module m
  implicit none
  integer :: i
end module m

use m, only: i, j=>i, k=>i
implicit none
j = 5
k = 3
i = 4
if(i /= k .or. j /= k .or. i /= 4) stop 'ERROR'
end
Comment 1 Daniel Kraft 2008-09-01 13:44:32 UTC
Subject: Bug 37193

Author: domob
Date: Mon Sep  1 13:43:10 2008
New Revision: 139866

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139866
Log:
2008-09-01  Daniel Kraft  <d@domob.eu>

	PR fortran/37193
	* module.c (read_module): Initialize use_only flag on used symbols.

2008-09-01  Daniel Kraft  <d@domob.eu>

	PR fortran/37193
	* gfortran.dg/use_rename_4.f90: New test.
	* gfortran.dg/use_rename_5.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/use_rename_4.f90
    trunk/gcc/testsuite/gfortran.dg/use_rename_5.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c
    trunk/gcc/testsuite/ChangeLog

Comment 2 Daniel Kraft 2008-09-03 12:27:21 UTC
Subject: Bug 37193

Author: domob
Date: Wed Sep  3 12:25:57 2008
New Revision: 139936

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139936
Log:
2008-08-30  Daniel Kraft  <d@domob.eu>

	PR fortran/37193
	* module.c (read_module): Initialize use_only flag on used symbols.

2008-08-30  Daniel Kraft  <d@domob.eu>

	PR fortran/37193
	* gfortran.dg/use_rename_4.f90: New test.
	* gfortran.dg/use_rename_5.f90: New test.

2008-06-24  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/36371
	* gfortran.dg/data_array_5.f90: New test.

2008-06-24  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/36371
	* expr.c (gfc_check_assign):  Change message and locus for
	error when conform == 0.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/data_array_5.f90
    branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/use_rename_4.f90
    branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/use_rename_5.f90
Modified:
    branches/gcc-4_3-branch/gcc/fortran/ChangeLog
    branches/gcc-4_3-branch/gcc/fortran/expr.c
    branches/gcc-4_3-branch/gcc/fortran/module.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog

Comment 3 Daniel Kraft 2008-09-03 12:28:14 UTC
Fixed on 4.4 and 4.3.