public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18878] New: Erronous error message on vaild USE statement
@ 2004-12-07 20:57 sgk at troutmask dot apl dot washington dot edu
2004-12-07 20:58 ` [Bug fortran/18878] " sgk at troutmask dot apl dot washington dot edu
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2004-12-07 20:57 UTC (permalink / raw)
To: gcc-bugs
gfortran issues an error and exits if a program contains
a USE statement of the form
USE MOD_NAME, ONLY : A => B, C => B
Apparently, gfortran does not like the multiple use of the B
symbol.
--
Summary: Erronous error message on vaild USE statement
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sgk at troutmask dot apl dot washington dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: amd64-unknown-freebsd6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
@ 2004-12-07 20:58 ` sgk at troutmask dot apl dot washington dot edu
2004-12-07 21:01 ` sgk at troutmask dot apl dot washington dot edu
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2004-12-07 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-12-07 20:58 -------
Created an attachment (id=7702)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7702&action=view)
Here a program that demonstrates the bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
2004-12-07 20:58 ` [Bug fortran/18878] " sgk at troutmask dot apl dot washington dot edu
@ 2004-12-07 21:01 ` sgk at troutmask dot apl dot washington dot edu
2004-12-08 14:45 ` tobi at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2004-12-07 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-12-07 21:01 -------
Subject: Re: Erronous error message on vaild USE statement
On Tue, Dec 07, 2004 at 08:58:24PM -0000, sgk at troutmask dot apl dot washington dot edu wrote:
>
> ------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-12-07 20:58 -------
> Created an attachment (id=7702)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7702&action=view)
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7702&action=view)
> Here a program that demonstrates the bug.
>
An, here's the error message.
troutmask:sgk[241] gfc -o ab ab.f90
In file ab.f90:7
use a, only : e => b, f => b
1
Error: Symbol 'b' referenced at (1) not found in module 'a'
In file ab.f90:16
real(f) y
1
Error: Variable 'f' at (1) cannot appear in an initialization expression
In file ab.f90:19
y = 1.e0_f
1
Error: Missing kind-parameter at (1)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
2004-12-07 20:58 ` [Bug fortran/18878] " sgk at troutmask dot apl dot washington dot edu
2004-12-07 21:01 ` sgk at troutmask dot apl dot washington dot edu
@ 2004-12-08 14:45 ` tobi at gcc dot gnu dot org
2005-05-01 14:21 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-12-08 14:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-12-08 14:43 -------
Confirmed.
BTW I tried chaging f=>b in the attached program to f=>e (invalid, but the error
message suggests that we rename the symbol), but this didn't help.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-12-08 14:43:35
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (2 preceding siblings ...)
2004-12-08 14:45 ` tobi at gcc dot gnu dot org
@ 2005-05-01 14:21 ` pinskia at gcc dot gnu dot org
2005-05-01 15:21 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 14:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 14:21 -------
Fixed for 4.0.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (3 preceding siblings ...)
2005-05-01 14:21 ` pinskia at gcc dot gnu dot org
@ 2005-05-01 15:21 ` pinskia at gcc dot gnu dot org
2005-05-01 15:22 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 15:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-01 15:21 -------
Woops must have used the wrong file to test with.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (4 preceding siblings ...)
2005-05-01 15:21 ` pinskia at gcc dot gnu dot org
@ 2005-05-01 15:22 ` pinskia at gcc dot gnu dot org
2005-08-03 11:51 ` paulthomas2 at wanadoo dot fr
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-01 15:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
Target Milestone|4.0.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (5 preceding siblings ...)
2005-05-01 15:22 ` pinskia at gcc dot gnu dot org
@ 2005-08-03 11:51 ` paulthomas2 at wanadoo dot fr
2005-08-03 19:56 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-08-03 11:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-08-03 11:51 -------
Two separate USE statements works correctly, as the example below can
demonstrate. This has got to be solvable....
Paul T
module a
integer, parameter :: b = kind(1.e0)
end module a
program d
use a, only : e => b
use a, only : f => b
real(e) x
real(f) y
x = 1.e0_e
y = 1.e0_f
print *, x, y
end program d
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (6 preceding siblings ...)
2005-08-03 11:51 ` paulthomas2 at wanadoo dot fr
@ 2005-08-03 19:56 ` pinskia at gcc dot gnu dot org
2005-08-23 17:48 ` tobi at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03 19:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-03 19:56 -------
*** Bug 23217 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dir at lanl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (7 preceding siblings ...)
2005-08-03 19:56 ` pinskia at gcc dot gnu dot org
@ 2005-08-23 17:48 ` tobi at gcc dot gnu dot org
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-08-23 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-08-23 17:24 -------
I just received this e-mail:
...
Whilst at the airport, I saw a solution to PR18878, whose existence has
bugged me for ages because it looks as if it should be easy. I though
that I would get it to you, via my sister's ISP but cannot do a proper
submit until I am back home (1st Sept). If either of you want to bang
it in, please feel free; it is independent of the other patches. This
works:
! PR18878 example from Steve Kargl
!
module a
integer, parameter :: b = kind(1.e0)
end module a
program d
use a, only : e => b, f => b
real(e) x
real(f) y
x = 1.e0_e
y = 1.e0_f
print *, x, y
end program d
as does this:
module global
real a
end module global
program test_use
use global, only: b=>a, c=>a
b = 5
if (c /= 5) call abort ()
end program test_use
it regtests fine under Cygwin/Athlon2200M
Best regards
Paul T
PS Cutting and pasting from Cygwin to XP is not good for my head.
Excuses if it is a bit grunged up.
Index: gcc/gcc/fortran/module.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/module.c,v
retrieving revision 1.35
diff -c -p -r1.35 module.c
*** gcc/gcc/fortran/module.c 19 Aug 2005 09:05:03 -0000 1.35
--- gcc/gcc/fortran/module.c 23 Aug 2005 16:51:57 -0000
*************** cleanup:
*** 585,601 ****
}
! /* Given a name, return the name under which to load this symbol.
! Returns NULL if this symbol shouldn't be loaded. */
static const char *
! find_use_name (const char *name)
{
gfc_use_rename *u;
for (u = gfc_rename_list; u; u = u->next)
! if (strcmp (u->use_name, name) == 0)
! break;
if (u == NULL)
return only_flag ? NULL : name;
--- 588,618 ----
}
! /* Given a name and a number, inst, return the inst name
! under which to load this symbol. Returns NULL if this
! symbol shouldn't be loaded. If inst is zero, returns
! the number of instances of this name. */
static const char *
! find_n_use_name (const char *name, int *inst)
{
gfc_use_rename *u;
+ int i;
+ i = 0;
for (u = gfc_rename_list; u; u = u->next)
! {
! if (strcmp (u->use_name, name) != 0)
! continue;
! if (++i == *inst)
! break;
! }
!
! if (!*inst)
! {
! *inst = i;
! return NULL;
! }
if (u == NULL)
return only_flag ? NULL : name;
*************** find_use_name (const char *name)
*** 605,610 ****
--- 622,649 ----
return (u->local_name[0] != '\0') ? u->local_name : name;
}
+ /* Given a name, return the name under which to load this symbol.
+ Returns NULL if this symbol shouldn't be loaded. */
+
+ static const char *
+ find_use_name (const char *name)
+ {
+ int i = 1;
+ return find_n_use_name (name, &i);
+ }
+
+ /* Given a real name, return the number of use names associated
+ with it. */
+
+ static int
+ number_use_names (const char *name)
+ {
+ int i = 0;
+ const char *c;
+ c = find_n_use_name (name, &i);
+ return i;
+ }
+
/* Try to find the operator in the current list. */
*************** read_module (void)
*** 3020,3026 ****
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_intrinsic_op i;
! int ambiguous, symbol;
pointer_info *info;
gfc_use_rename *u;
gfc_symtree *st;
--- 3101,3107 ----
const char *p;
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_intrinsic_op i;
! int ambiguous, symbol, j, nuse;
pointer_info *info;
gfc_use_rename *u;
gfc_symtree *st;
*************** read_module (void)
*** 3084,3133 ****
info = get_integer (symbol);
! /* Get the local name for this symbol. */
! p = find_use_name (name);
!
! /* Skip symtree nodes not in an ONLY caluse. */
! if (p == NULL)
! continue;
!
! /* Check for ambiguous symbols. */
! st = gfc_find_symtree (gfc_current_ns->sym_root, p);
! if (st != NULL)
! {
! if (st->n.sym != info->u.rsym.sym)
! st->ambiguous = 1;
! info->u.rsym.symtree = st;
! }
! else
{
! /* Create a symtree node in the current namespace for this
symbol. */
! st = check_unique_name (p) ? get_unique_symtree (gfc_current_ns) :
! gfc_new_symtree (&gfc_current_ns->sym_root, p);
! st->ambiguous = ambiguous;
! sym = info->u.rsym.sym;
! /* Create a symbol node if it doesn't already exist. */
! if (sym == NULL)
{
! sym = info->u.rsym.sym =
! gfc_new_symbol (info->u.rsym.true_name, gfc_current_ns);
!
! sym->module = gfc_get_string (info->u.rsym.module);
}
! st->n.sym = sym;
! st->n.sym->refs++;
! /* Store the symtree pointing to this symbol. */
! info->u.rsym.symtree = st;
! if (info->u.rsym.state == UNUSED)
! info->u.rsym.state = NEEDED;
! info->u.rsym.referenced = 1;
}
}
--- 3168,3226 ----
info = get_integer (symbol);
! /* See how many use names there are. If none, go through the start
! of the loop at least once. */
! nuse = number_use_names (name);
! if (nuse == 0)
! nuse = 1;
! for (j = 1; j <= nuse; j++)
{
! /* Get the jth local name for this symbol. */
! p = find_n_use_name (name, &j);
! /* Skip symtree nodes not in an ONLY clause. */
! if (p == NULL)
! continue;
! /* Check for ambiguous symbols. */
! st = gfc_find_symtree (gfc_current_ns->sym_root, p);
! if (st != NULL)
{
! if (st->n.sym != info->u.rsym.sym)
! st->ambiguous = 1;
! info->u.rsym.symtree = st;
}
+ else
+ {
+ /* Create a symtree node in the current namespace for this
symbol. */
+ st = check_unique_name (p) ? get_unique_symtree
(gfc_current_ns) :
+ gfc_new_symtree (&gfc_current_ns->sym_root, p);
+
+ st->ambiguous = ambiguous;
+
+ sym = info->u.rsym.sym;
+
+ /* Create a symbol node if it doesn't already exist. */
+ if (sym == NULL)
+ {
+ sym = info->u.rsym.sym =
+ gfc_new_symbol (info->u.rsym.true_name, gfc_current_ns);
! sym->module = gfc_get_string (info->u.rsym.module);
! }
!
! st->n.sym = sym;
! st->n.sym->refs++;
! /* Store the symtree pointing to this symbol. */
! info->u.rsym.symtree = st;
! if (info->u.rsym.state == UNUSED)
! info->u.rsym.state = NEEDED;
! info->u.rsym.referenced = 1;
! }
}
}
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |tobi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] Erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (8 preceding siblings ...)
2005-08-23 17:48 ` tobi at gcc dot gnu dot org
@ 2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
2005-09-09 7:55 ` [Bug fortran/18878] [4.0 only] erronous " fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 00:24 -------
Subject: Bug 18878
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pault@gcc.gnu.org 2005-09-09 00:23:18
Modified files:
gcc/fortran : gfortran.h match.c module.c primary.c
trans-common.c trans-decl.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: module_blank_common.f90
module_double_reuse.f90
common_equivalence_1.f
common_equivalence_2.f
common_equivalence_3.f
contained_equivalence_1.f90
module_commons_1.f90
module_equivalence_1.f90
nested_modules_1.f90
Log message:
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* module.c (find_use_name_n): Based on original
find_use_name. Either counts number of use names for a
given real name or returns use name n.
(find_use_name, number_use_names): Interfaces to the
function find_use_name_n.
(read_module): Add the logic and calls to these functions,
so that mutiple reuses of the same real name are loaded.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22304
PR fortran/23270
PR fortran/18870
PR fortran/16511
PR fortran/17917
* gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
common.c so that it is accessible to module.c. Add common_head
field to gfc_symbol structure. Add field for the equivalence
name AND new attr field, in_equivalence.
* match.c (gfc_match_common, gfc_match_equivalence): In loops
that flag common block equivalences, emit an error if the
common blocks are different, using sym->common_head as the
common block identifier. Ensure that symbols that are equivalence
associated with a common block are marked as being in_common.
* module.c (write_blank_common): New.
(write_common): Use unmangled common block name.
(load_equiv): New function ported from g95.
(read_module): Call load_equiv.
(write_equiv): New function ported from g95. Correct
string referencing for gfc functions. Give module
equivalences a unique name.
(write_module): Call write_equiv and write_blank_common.
* primary.c (match_variable) Old gfc_match_variable, made
static and third argument provided to indicate if parent
namespace to be visited or not.
(gfc_match_variable) New. Interface to match_variable.
(gfc_match_equiv_variable) New. Interface to match_variable.
* trans-common.c (finish_equivalences): Provide the call
to create_common with a gfc_common_header so that
module equivalences are made external, rather than local.
(find_equivalences): Ensure that all members in common block
equivalences are marked as used. This prevents the subsequent
call to this function from making local unions.
* trans-decl.c (gfc_generate_function_code): Move the call to
gfc_generate_contained_functions to after the call to
gfc_trans_common so the use-associated, contained common
blocks produce the correct references.
(gfc_create_module_variable): Return for equivalenced symbols
with existing backend declaration.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* gfortran.dg/module_double_reuse.f90: New.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23270
PR fortran/22304
PR fortran/18870
PR fortran/17917
PR fortran/16511
* gfortran.dg/common_equivalence_1.f: New.
* gfortran.dg/common_equivalence_2.f: New.
* gfortran.dg/common_equivalence_3.f: New.
* gfortran.dg/contained_equivalence_1.f90: New.
* gfortran.dg/module_blank_common.f90: New.
* gfortran.dg/module_commons_1.f90: New.
* gfortran.dg/module_equivalence_1.f90: New.
* gfortran.dg/nested_modules_1.f90: New.
* gfortran.dg/g77/19990905-0.f: Remove XFAIL, rearrange
equivalences and add comment to connect the test with
the PR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.84&r2=1.85
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.67&r2=1.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.543&r2=1.544
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_blank_common.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_double_reuse.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_1.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_2.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_3.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/contained_equivalence_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_commons_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_equivalence_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_modules_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6033&r2=1.6034
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] [4.0 only] erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (9 preceding siblings ...)
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 7:55 ` fxcoudert at gcc dot gnu dot org
2005-09-09 8:22 ` paulthomas2 at wanadoo dot fr
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-09-09 7:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-09 07:55 -------
Paul, will your huge module patch be backported to 4.0?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |paulthomas2 at wanadoo dot
| |fr
Summary|Erronous error message on |[4.0 only] erronous error
|vaild USE statement |message on vaild USE
| |statement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] [4.0 only] erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (10 preceding siblings ...)
2005-09-09 7:55 ` [Bug fortran/18878] [4.0 only] erronous " fxcoudert at gcc dot gnu dot org
@ 2005-09-09 8:22 ` paulthomas2 at wanadoo dot fr
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-09-09 8:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paulthomas2 at wanadoo dot fr 2005-09-09 08:21 -------
Subject: Re: [4.0 only] erronous error message on vaild
USE statement
fxcoudert at gcc dot gnu dot org wrote:
>------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-09-09 07:55 -------
>Paul, will your huge module patch be backported to 4.0?
>
>
>
I am just in the process of doing it.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] [4.0 only] erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (11 preceding siblings ...)
2005-09-09 8:22 ` paulthomas2 at wanadoo dot fr
@ 2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-09 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-09 09:06 -------
Subject: Bug 18878
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: pault@gcc.gnu.org 2005-09-09 09:06:09
Modified files:
gcc/fortran : gfortran.h match.h match.c module.c primary.c
trans-common.c trans-decl.c ChangeLog
gcc/testsuite/gfortran.dg/g77: 19990905-0.f
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: module_blank_common.f90
module_double_reuse.f90
common_equivalence_1.f
common_equivalence_2.f
common_equivalence_3.f
contained_equivalence_1.f90
module_commons_1.f90
module_equivalence_1.f90
nested_modules_1.f90
Log message:
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* module.c (find_use_name_n): Based on original
find_use_name. Either counts number of use names for a
given real name or returns use name n.
(find_use_name, number_use_names): Interfaces to the
function find_use_name_n.
(read_module): Add the logic and calls to these functions,
so that mutiple reuses of the same real name are loaded.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/22304
PR fortran/23270
PR fortran/18870
PR fortran/16511
PR fortran/17917
* gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
common.c so that it is accessible to module.c. Add common_head
field to gfc_symbol structure. Add field for the equivalence
name AND new attr field, in_equivalence.
* match.c (gfc_match_common, gfc_match_equivalence): In loops
that flag common block equivalences, emit an error if the
common blocks are different, using sym->common_head as the
common block identifier. Ensure that symbols that are equivalence
associated with a common block are marked as being in_common.
* module.c (write_blank_common): New.
(write_common): Use unmangled common block name.
(load_equiv): New function ported from g95.
(read_module): Call load_equiv.
(write_equiv): New function ported from g95. Correct
string referencing for gfc functions. Give module
equivalences a unique name.
(write_module): Call write_equiv and write_blank_common.
* primary.c (match_variable) Old gfc_match_variable, made
static and third argument provided to indicate if parent
namespace to be visited or not.
(gfc_match_variable): New. Interface to match_variable.
(gfc_match_equiv_variable): New. Interface to match_variable.
* trans-common.c (finish_equivalences): Provide the call
to create_common with a gfc_common_header so that
module equivalences are made external, rather than local.
(find_equivalences): Ensure that all members in common block
equivalences are marked as used. This prevents the subsequent
call to this function from making local unions.
* trans-decl.c (gfc_generate_function_code): Move the call to
gfc_generate_contained_functions to after the call to
gfc_trans_common so the use-associated, contained common
blocks produce the correct references.
(gfc_create_module_variable): Return for equivalenced symbols
with existing backend declaration.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
* gfortran.dg/module_double_reuse.f90: New.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/23270
PR fortran/22304
PR fortran/18870
PR fortran/17917
PR fortran/16511
* gfortran.dg/common_equivalence_1.f: New.
* gfortran.dg/common_equivalence_2.f: New.
* gfortran.dg/common_equivalence_3.f: New.
* gfortran.dg/contained_equivalence_1.f90: New.
* gfortran.dg/module_blank_common.f90: New.
* gfortran.dg/module_commons_1.f90: New.
* gfortran.dg/module_equivalence_1.f90: New.
* gfortran.dg/nested_modules_1.f90: New.
* gfortran.dg/g77/19990905-0.f: Remove XFAIL, rearrange
equivalences and add comment to connect the test with
the PR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.58.2.16&r2=1.58.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.10.36.1&r2=1.10.36.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31.8.11&r2=1.31.8.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.31.2.2&r2=1.31.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/primary.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.22.2.10&r2=1.22.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.23.2.4&r2=1.23.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.54.2.5&r2=1.54.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.114&r2=1.335.2.115
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_blank_common.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_double_reuse.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_1.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_2.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/common_equivalence_3.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/contained_equivalence_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_commons_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/module_equivalence_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/nested_modules_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/g77/19990905-0.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1&r2=1.1.48.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.394&r2=1.5084.2.395
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/18878] [4.0 only] erronous error message on vaild USE statement
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
` (12 preceding siblings ...)
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-09 22:16 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-09 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-09 22:15 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18878
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-09-09 22:16 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-07 20:57 [Bug fortran/18878] New: Erronous error message on vaild USE statement sgk at troutmask dot apl dot washington dot edu
2004-12-07 20:58 ` [Bug fortran/18878] " sgk at troutmask dot apl dot washington dot edu
2004-12-07 21:01 ` sgk at troutmask dot apl dot washington dot edu
2004-12-08 14:45 ` tobi at gcc dot gnu dot org
2005-05-01 14:21 ` pinskia at gcc dot gnu dot org
2005-05-01 15:21 ` pinskia at gcc dot gnu dot org
2005-05-01 15:22 ` pinskia at gcc dot gnu dot org
2005-08-03 11:51 ` paulthomas2 at wanadoo dot fr
2005-08-03 19:56 ` pinskia at gcc dot gnu dot org
2005-08-23 17:48 ` tobi at gcc dot gnu dot org
2005-09-09 0:25 ` cvs-commit at gcc dot gnu dot org
2005-09-09 7:55 ` [Bug fortran/18878] [4.0 only] erronous " fxcoudert at gcc dot gnu dot org
2005-09-09 8:22 ` paulthomas2 at wanadoo dot fr
2005-09-09 9:07 ` cvs-commit at gcc dot gnu dot org
2005-09-09 22:16 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).