public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/13249] New: Error when using COMMON
@ 2003-12-01 1:25 dann at godzilla dot ics dot uci dot edu
2003-12-01 1:28 ` [Bug fortran/13249] " dann at godzilla dot ics dot uci dot edu
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2003-12-01 1:25 UTC (permalink / raw)
To: gcc-bugs
--
Summary: Error when using COMMON
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
@ 2003-12-01 1:28 ` dann at godzilla dot ics dot uci dot edu
2003-12-01 1:30 ` pinskia at gcc dot gnu dot org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2003-12-01 1:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2003-12-01 01:28 -------
With: gcc version 3.5-tree-ssa 20031130 (merged 20031123)
mymod.f90
MODULE mymod
TYPE :: mymod_type
INTEGER field1
INTEGER field2
END TYPE
TYPE (mymod_type), DIMENSION(:), ALLOCATABLE :: AN_EXAMPLE
END MODULE mymod
test.f90:
SUBROUTINE mytest (MYARG)
USE mymod;
INTEGER :: MYARG
COMMON /AN_EXAMPLE/
END
> gfortran -c test.f90
In file test.f90:4
COMMON /AN_EXAMPLE/
1
Error: Cannot change attributes of USE-associated symbol at (1)
Intel's compiler compiles this code just fine.
Code like this can be found in SPEC2000.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
2003-12-01 1:28 ` [Bug fortran/13249] " dann at godzilla dot ics dot uci dot edu
@ 2003-12-01 1:30 ` pinskia at gcc dot gnu dot org
2003-12-01 2:19 ` [Bug fortran/13249] [gfortran] " pinskia at gcc dot gnu dot org
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-01 1:30 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Keywords| |rejects-valid
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
2003-12-01 1:28 ` [Bug fortran/13249] " dann at godzilla dot ics dot uci dot edu
2003-12-01 1:30 ` pinskia at gcc dot gnu dot org
@ 2003-12-01 2:19 ` pinskia at gcc dot gnu dot org
2003-12-02 15:55 ` pinskia at gcc dot gnu dot org
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-01 2:19 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Error when using COMMON |[gfortran] Error when using
| |COMMON
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (2 preceding siblings ...)
2003-12-01 2:19 ` [Bug fortran/13249] [gfortran] " pinskia at gcc dot gnu dot org
@ 2003-12-02 15:55 ` pinskia at gcc dot gnu dot org
2003-12-05 19:58 ` toon at moene dot indiv dot nluug dot nl
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-02 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-02 15:55 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-12-02 15:55:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (3 preceding siblings ...)
2003-12-02 15:55 ` pinskia at gcc dot gnu dot org
@ 2003-12-05 19:58 ` toon at moene dot indiv dot nluug dot nl
2004-05-14 1:23 ` lei at il dot ibm dot com
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: toon at moene dot indiv dot nluug dot nl @ 2003-12-05 19:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From toon at moene dot indiv dot nluug dot nl 2003-12-05 19:58 -------
There's no reason this bug should be marked critical, if you compare it to other
bugs reported against gfortran.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (4 preceding siblings ...)
2003-12-05 19:58 ` toon at moene dot indiv dot nluug dot nl
@ 2004-05-14 1:23 ` lei at il dot ibm dot com
2004-05-14 16:33 ` dann at godzilla dot ics dot uci dot edu
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: lei at il dot ibm dot com @ 2004-05-14 1:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lei at il dot ibm dot com 2004-05-13 13:55 -------
This is marked as rejects-valid, but the line
COMMON /AN_EXAMPLE/
does not look valid at all to me. In fact, ibm xlf rejects it, too.
Or maybe I don't understand its meaning?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (5 preceding siblings ...)
2004-05-14 1:23 ` lei at il dot ibm dot com
@ 2004-05-14 16:33 ` dann at godzilla dot ics dot uci dot edu
2004-05-17 0:22 ` dann at godzilla dot ics dot uci dot edu
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-05-14 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-05-13 23:15 -------
> This is marked as rejects-valid, but the line
>
> COMMON /AN_EXAMPLE/
>
> does not look valid at all to me. In fact, ibm xlf rejects it, too.
> Or maybe I don't understand its meaning?
The example is derived from fma3d in SPEC2k. See platt.f90 and truss.f90.
I might have oversimplified the example, but the error is still present in those
files. Could you take a look please?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (6 preceding siblings ...)
2004-05-14 16:33 ` dann at godzilla dot ics dot uci dot edu
@ 2004-05-17 0:22 ` dann at godzilla dot ics dot uci dot edu
2004-05-17 1:36 ` lei at il dot ibm dot com
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: dann at godzilla dot ics dot uci dot edu @ 2004-05-17 0:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-05-16 01:55 -------
Corrected testcase:
MODULE mymod
TYPE :: mymod_type
INTEGER field1
INTEGER field2
END TYPE
TYPE (mymod_type), DIMENSION(:), ALLOCATABLE :: AN_EXAMPLE
END MODULE mymod
SUBROUTINE mytest (MYARG)
USE mymod;
INTEGER :: MYARG
COMMON /AN_EXAMPLE/ Rx, Ry, Rz
END
Fails with gfortran:
In file PR13249.f90:13
COMMON /AN_EXAMPLE/ Rx, Ry, Rz
1
Error: Cannot change attributes of USE-associated symbol at (1)
It compiles with the Intel and PGI compilers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (7 preceding siblings ...)
2004-05-17 0:22 ` dann at godzilla dot ics dot uci dot edu
@ 2004-05-17 1:36 ` lei at il dot ibm dot com
2004-05-17 8:20 ` tobi at gcc dot gnu dot org
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: lei at il dot ibm dot com @ 2004-05-17 1:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lei at il dot ibm dot com 2004-05-16 14:23 -------
PROBLEM DESCRIPTION
===================
A variable that is both defined in a module, and used as common
block name, triggers error message "Cannot change attributes of
USE-associated symbol". For example, the following (valid) code
is rejected:
MODULE MOD
INTEGER FOO
END
PROGRAM MAIN
USE MOD
COMMON /FOO/ BAR
END
This pattern is common in some spec benchmarks. For comparison,
the following (also valid) code is accepted:
PROGRAM MAIN
INTEGER FOO
COMMON /FOO/ BAR
END
ANALYSIS
========
Function gfc_add_common, in file symbol.c, says:
gfc_add_common (symbol_attribute * attr, locus * where)
{
if (check_used (attr, where) || check_done (attr, where))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return FAILURE;
attr->common = 1;
return check_conflict (attr, where);
}
The call to check_used() checks the "use" attribute, which
is 1 for variables defined in modules. I can't understand
why this check is necessary. Removing the call to check_used
apparently fixes the problem and does not cause regressions,
BUT I guess it is there for a purpose...
If nobody can see why this check is needed, I will submit the
patch to remove the check.
Victor
--
Victor Leikehman
IBM Research Labs in Haifa, Israel
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (8 preceding siblings ...)
2004-05-17 1:36 ` lei at il dot ibm dot com
@ 2004-05-17 8:20 ` tobi at gcc dot gnu dot org
2004-05-17 10:35 ` tobi at gcc dot gnu dot org
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-17 8:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-05-16 21:38 -------
I can't send or receive mail due to server issues, otherwise I'd participate on
the mailing list. As Paul has pointed out, this is a deeper issue which is also
relevant in PR 13575 and PR 13372. In PR 13575 I outlined a non-invasive
solu^H^H^H^Hfix, which might get us working again.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (9 preceding siblings ...)
2004-05-17 8:20 ` tobi at gcc dot gnu dot org
@ 2004-05-17 10:35 ` tobi at gcc dot gnu dot org
2004-05-17 10:38 ` tobi at gcc dot gnu dot org
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-17 10:35 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |15481
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (10 preceding siblings ...)
2004-05-17 10:35 ` tobi at gcc dot gnu dot org
@ 2004-05-17 10:38 ` tobi at gcc dot gnu dot org
2004-05-18 13:08 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-05-17 10:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-05-16 21:46 -------
Added Victor to CC:, so that he can see my comments, and possibly forward to the
mailing list. Thanks.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |lei at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (11 preceding siblings ...)
2004-05-17 10:38 ` tobi at gcc dot gnu dot org
@ 2004-05-18 13:08 ` pinskia at gcc dot gnu dot org
2004-05-23 9:44 ` cvs-commit at gcc dot gnu dot org
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-18 13:08 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |15502
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (12 preceding siblings ...)
2004-05-18 13:08 ` pinskia at gcc dot gnu dot org
@ 2004-05-23 9:44 ` cvs-commit at gcc dot gnu dot org
2004-06-09 13:08 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-23 9:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-22 14:51 -------
Subject: Bug 13249
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: pbrook@gcc.gnu.org 2004-05-22 14:51:18
Modified files:
gcc/fortran : ChangeLog symbol.c
Log message:
PR fortran/13249
* symbol.c (gfc_add_common): Disable checks to work around other more
fundamental inadequacies.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.39&r2=1.40
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/symbol.c.diff?cvsroot=gcc&r1=1.3&r2=1.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (13 preceding siblings ...)
2004-05-23 9:44 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-09 13:08 ` cvs-commit at gcc dot gnu dot org
2004-06-09 13:09 ` tobi at gcc dot gnu dot org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-09 13:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-09 13:08 -------
Subject: Bug 13249
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-06-09 13:08:13
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.fortran-torture/compile: name_clash.f90
Log message:
PR fortran/13249
* gfortran.fortran-torture/compile/name_clash.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3831&r2=1.3832
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/compile/name_clash.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] [gfortran] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (14 preceding siblings ...)
2004-06-09 13:08 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-09 13:09 ` tobi at gcc dot gnu dot org
2004-06-22 14:03 ` [Bug fortran/13249] " tobi at gcc dot gnu dot org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-06-09 13:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-06-09 13:09 -------
Worked around in the previous commit. The workaround can be removed, once pr
15482 is fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (15 preceding siblings ...)
2004-06-09 13:09 ` tobi at gcc dot gnu dot org
@ 2004-06-22 14:03 ` tobi at gcc dot gnu dot org
2004-06-29 18:57 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-06-22 14:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-06-22 14:03 -------
that should be "... once pr15481 is fixed."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (16 preceding siblings ...)
2004-06-22 14:03 ` [Bug fortran/13249] " tobi at gcc dot gnu dot org
@ 2004-06-29 18:57 ` cvs-commit at gcc dot gnu dot org
2004-06-29 18:59 ` cvs-commit at gcc dot gnu dot org
2004-07-09 14:56 ` tobi at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-29 18:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-29 18:56 -------
Subject: Bug 13249
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-06-29 18:56:47
Modified files:
gcc/fortran : decl.c dump-parse-tree.c gfortran.h match.c
match.h module.c parse.c symbol.c
trans-common.c trans-decl.c
Log message:
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
Andrew Vaught <andyv@firstinter.net>
PR fortran/13249
PR fortran/15481
* declc (gfc_match_save): Adapt to new common structures,
don't allow saving USE-associated common.
* dump-parse-tree (gfc_show_attr): (saved_)common are not
symbol attributes any longer.
(gfc_show_symbol): Don't show old-style commons any longer.
(gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
interface.
* gfortran.h (symbol_attribute): Remove common and saved_common
attributes.
(gfc_symbol): Remove common_head element.
(gfc_common_head): New struct.
(gfc_get_common_head): New macro.
(gfc_symtree): Add field 'common' to union.
(gfc_namespace): Add field 'common_root'; change type of field
'blank_common' to blank_common.
(gfc_add_data): New prototype.
(gfc_traverse_symtree): Expect a symtree as first argument
instead of namespace.
* match.c (gfc_get_common): New function.
(match_common_name): Change to take char * as argument, adapt,
fix bug with empty name.
(gfc_match_common): Adapt to new data structures. Disallow
redeclaration of USE-associated COMMON-block. Fix bug with
empty common.
(var_element): Adapt to new common structures.
* match.h (gfc_get_common): Declare.
* module.c: Add 2004 to copyright years, add commons to module
file layout description.
(ab_attribute, attr_bits, mio_symbol_attributes): Remove code
for removed attributes.
(mio_symbol): Adapt to new way of storing common relations.
(load_commons): New function.
(read_module): Skip common list on first pass, load_commons at
second.
(write_commons): New function.
(write_module): Call write_commons().
* symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
functions related to removed attributes.
(gfc_add_data): New function.
(gfc_clear_attr): Don't set removed attributes.
(gfc_copy_attr): Don't copy removed attributes.
(traverse_symtree): Remove.
(gfc_traverse_symtree): Don't traverse symbol
tree of the passed namespace, but require a symtree to be passed
instead. Unify with traverse_symtree.
(gfc_traverse_ns): Call gfc_traverse_symtree according to new
interface.
(save_symbol): Remove setting of removed attribute.
* trans-common.c (gfc_sym_mangled_common_id): Change to
take 'char *' argument instead of 'gfc_symbol'.
(build_common_decl, new_segment, translate_common): Adapt to new
data structures, add new
argument name.
(create_common): Adapt to new data structures, add new
argument name. Fix typo in intialization of derived types.
(finish_equivalences): Add second argument in call to
create_common.
(named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
(gfc_trans_common): Adapt to new data structures.
* trans-decl.c (gfc_create_module_variables): Also output
symbols from commons.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/decl.c.diff?cvsroot=gcc&r1=1.11&r2=1.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/dump-parse-tree.c.diff?cvsroot=gcc&r1=1.5&r2=1.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/gfortran.h.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.c.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/match.h.diff?cvsroot=gcc&r1=1.4&r2=1.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/module.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/parse.c.diff?cvsroot=gcc&r1=1.9&r2=1.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/symbol.c.diff?cvsroot=gcc&r1=1.6&r2=1.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-common.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/trans-decl.c.diff?cvsroot=gcc&r1=1.14&r2=1.15
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (17 preceding siblings ...)
2004-06-29 18:57 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-29 18:59 ` cvs-commit at gcc dot gnu dot org
2004-07-09 14:56 ` tobi at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-29 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-29 18:57 -------
Subject: Bug 13249
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tobi@gcc.gnu.org 2004-06-29 18:57:25
Modified files:
gcc/fortran : ChangeLog
Log message:
2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
Andrew Vaught <andyv@firstinter.net>
PR fortran/13249
PR fortran/15481
* declc (gfc_match_save): Adapt to new common structures,
don't allow saving USE-associated common.
* dump-parse-tree (gfc_show_attr): (saved_)common are not
symbol attributes any longer.
(gfc_show_symbol): Don't show old-style commons any longer.
(gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
interface.
* gfortran.h (symbol_attribute): Remove common and saved_common
attributes.
(gfc_symbol): Remove common_head element.
(gfc_common_head): New struct.
(gfc_get_common_head): New macro.
(gfc_symtree): Add field 'common' to union.
(gfc_namespace): Add field 'common_root'; change type of field
'blank_common' to blank_common.
(gfc_add_data): New prototype.
(gfc_traverse_symtree): Expect a symtree as first argument
instead of namespace.
* match.c (gfc_get_common): New function.
(match_common_name): Change to take char * as argument, adapt,
fix bug with empty name.
(gfc_match_common): Adapt to new data structures. Disallow
redeclaration of USE-associated COMMON-block. Fix bug with
empty common.
(var_element): Adapt to new common structures.
* match.h (gfc_get_common): Declare.
* module.c: Add 2004 to copyright years, add commons to module
file layout description.
(ab_attribute, attr_bits, mio_symbol_attributes): Remove code
for removed attributes.
(mio_symbol): Adapt to new way of storing common relations.
(load_commons): New function.
(read_module): Skip common list on first pass, load_commons at
second.
(write_commons): New function.
(write_module): Call write_commons().
* symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
functions related to removed attributes.
(gfc_add_data): New function.
(gfc_clear_attr): Don't set removed attributes.
(gfc_copy_attr): Don't copy removed attributes.
(traverse_symtree): Remove.
(gfc_traverse_symtree): Don't traverse symbol
tree of the passed namespace, but require a symtree to be passed
instead. Unify with traverse_symtree.
(gfc_traverse_ns): Call gfc_traverse_symtree according to new
interface.
(save_symbol): Remove setting of removed attribute.
* trans-common.c (gfc_sym_mangled_common_id): Change to
take 'char *' argument instead of 'gfc_symbol'.
(build_common_decl, new_segment, translate_common): Adapt to new
data structures, add new
argument name.
(create_common): Adapt to new data structures, add new
argument name. Fix typo in intialization of derived types.
(finish_equivalences): Add second argument in call to
create_common.
(named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
(gfc_trans_common): Adapt to new data structures.
* trans-decl.c (gfc_create_module_variables): Also output
symbols from commons.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.89&r2=1.90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/13249] Error when using COMMON
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
` (18 preceding siblings ...)
2004-06-29 18:59 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-09 14:56 ` tobi at gcc dot gnu dot org
19 siblings, 0 replies; 21+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-09 14:56 UTC (permalink / raw)
To: gcc-bugs
--
Bug 13249 depends on bug 15481, which changed state.
Bug 15481 Summary: [meta-bugs] frontend adds superfluous symbols to namespaces
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15481
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2004-07-09 14:56 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-01 1:25 [Bug fortran/13249] New: Error when using COMMON dann at godzilla dot ics dot uci dot edu
2003-12-01 1:28 ` [Bug fortran/13249] " dann at godzilla dot ics dot uci dot edu
2003-12-01 1:30 ` pinskia at gcc dot gnu dot org
2003-12-01 2:19 ` [Bug fortran/13249] [gfortran] " pinskia at gcc dot gnu dot org
2003-12-02 15:55 ` pinskia at gcc dot gnu dot org
2003-12-05 19:58 ` toon at moene dot indiv dot nluug dot nl
2004-05-14 1:23 ` lei at il dot ibm dot com
2004-05-14 16:33 ` dann at godzilla dot ics dot uci dot edu
2004-05-17 0:22 ` dann at godzilla dot ics dot uci dot edu
2004-05-17 1:36 ` lei at il dot ibm dot com
2004-05-17 8:20 ` tobi at gcc dot gnu dot org
2004-05-17 10:35 ` tobi at gcc dot gnu dot org
2004-05-17 10:38 ` tobi at gcc dot gnu dot org
2004-05-18 13:08 ` pinskia at gcc dot gnu dot org
2004-05-23 9:44 ` cvs-commit at gcc dot gnu dot org
2004-06-09 13:08 ` cvs-commit at gcc dot gnu dot org
2004-06-09 13:09 ` tobi at gcc dot gnu dot org
2004-06-22 14:03 ` [Bug fortran/13249] " tobi at gcc dot gnu dot org
2004-06-29 18:57 ` cvs-commit at gcc dot gnu dot org
2004-06-29 18:59 ` cvs-commit at gcc dot gnu dot org
2004-07-09 14:56 ` tobi 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).