public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50515] New: gfortran should not accept an external that is a common (r178939)
@ 2011-09-25 20:08 zeccav at gmail dot com
2011-09-26 8:04 ` [Bug fortran/50515] " janus at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: zeccav at gmail dot com @ 2011-09-25 20:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515
Bug #: 50515
Summary: gfortran should not accept an external that is a
common (r178939)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeccav@gmail.com
! gfortran should not accept an external that is a common (r178939)
common/sub/ a
external sub
end
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50515] gfortran should not accept an external that is a common (r178939)
2011-09-25 20:08 [Bug fortran/50515] New: gfortran should not accept an external that is a common (r178939) zeccav at gmail dot com
@ 2011-09-26 8:04 ` janus at gcc dot gnu.org
2011-09-26 20:13 ` janus at gcc dot gnu.org
2011-09-26 20:43 ` janus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-26 8:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Keywords| |accepts-invalid
Last reconfirmed| |2011-09-26
CC| |janus at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from janus at gcc dot gnu.org 2011-09-26 07:41:11 UTC ---
Trivial patch:
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 179143)
+++ gcc/fortran/resolve.c (working copy)
@@ -905,6 +905,10 @@ resolve_common_blocks (gfc_symtree *common_root)
gfc_error ("COMMON block '%s' at %L is used as PARAMETER at %L",
sym->name, &common_root->n.common->where, &sym->declared_at);
+ if (sym->attr.external)
+ gfc_error ("COMMON block '%s' at %L can not have the EXTERNAL attribute",
+ sym->name, &common_root->n.common->where);
+
if (sym->attr.intrinsic)
gfc_error ("COMMON block '%s' at %L is also an intrinsic procedure",
sym->name, &common_root->n.common->where);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50515] gfortran should not accept an external that is a common (r178939)
2011-09-25 20:08 [Bug fortran/50515] New: gfortran should not accept an external that is a common (r178939) zeccav at gmail dot com
2011-09-26 8:04 ` [Bug fortran/50515] " janus at gcc dot gnu.org
@ 2011-09-26 20:13 ` janus at gcc dot gnu.org
2011-09-26 20:43 ` janus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-26 20:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515
--- Comment #2 from janus at gcc dot gnu.org 2011-09-26 20:05:57 UTC ---
Author: janus
Date: Mon Sep 26 20:05:43 2011
New Revision: 179213
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179213
Log:
2011-09-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/50515
* resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
PR fortran/50517
* interface.c (gfc_compare_interfaces): Bugfix in check for result type.
2011-09-26 Janus Weil <janus@gcc.gnu.org>
PR fortran/50515
* gfortran.dg/common_15.f90: New.
PR fortran/50517
* gfortran.dg/dummy_procedure_5.f90: New.
* gfortran.dg/interface_26.f90: Modified error message.
* gfortran.dg/proc_ptr_11.f90: Ditto.
* gfortran.dg/proc_ptr_15.f90: Ditto.
* gfortran.dg/proc_ptr_comp_20.f90: Ditto.
* gfortran.dg/proc_ptr_result_5.f90: Ditto.
Added:
trunk/gcc/testsuite/gfortran.dg/common_15.f90
trunk/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/interface_26.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/50515] gfortran should not accept an external that is a common (r178939)
2011-09-25 20:08 [Bug fortran/50515] New: gfortran should not accept an external that is a common (r178939) zeccav at gmail dot com
2011-09-26 8:04 ` [Bug fortran/50515] " janus at gcc dot gnu.org
2011-09-26 20:13 ` janus at gcc dot gnu.org
@ 2011-09-26 20:43 ` janus at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu.org @ 2011-09-26 20:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #3 from janus at gcc dot gnu.org 2011-09-26 20:13:25 UTC ---
Fixed with r179213. Closing.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-26 20:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-25 20:08 [Bug fortran/50515] New: gfortran should not accept an external that is a common (r178939) zeccav at gmail dot com
2011-09-26 8:04 ` [Bug fortran/50515] " janus at gcc dot gnu.org
2011-09-26 20:13 ` janus at gcc dot gnu.org
2011-09-26 20:43 ` janus at gcc dot gnu.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).