public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
@ 2011-06-20 23:02 ` afhoffie at ncsu dot edu
2023-08-23 18:49 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: afhoffie at ncsu dot edu @ 2011-06-20 23:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
--- Comment #2 from afhoffie at ncsu dot edu 2011-06-20 23:02:09 UTC ---
Dear Sir or Madam,
I am trying to define an array index variable but also an allocatable array
in my fortran subroutine as a common object. This object is defined as a
global variable in C++ with extern"C"{struct{}name_;}. However, the gfortran
compiler tells me: "Error: variable in this context must be a constant.
Please see attached files.
Would appreciate any help. Thanks very much.
Best regards,
Andreas Hoffie
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
2011-06-20 23:02 ` [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object afhoffie at ncsu dot edu
@ 2023-08-23 18:49 ` anlauf at gcc dot gnu.org
2023-08-23 19:16 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-08-23 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #4 from anlauf at gcc dot gnu.org ---
Created attachment 55782
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55782&action=edit
Draft patch
How about the attached patch?
This gives for the code in comment#0:
pr32986.f90:2:14:
2 | real :: x(n)
| 1
3 | common /c/ x
| 2
Error: Automatic object 'x' at (1) cannot appear in COMMON at (2)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
2011-06-20 23:02 ` [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object afhoffie at ncsu dot edu
2023-08-23 18:49 ` anlauf at gcc dot gnu.org
@ 2023-08-23 19:16 ` anlauf at gcc dot gnu.org
2023-08-23 19:47 ` cvs-commit at gcc dot gnu.org
2023-08-23 19:50 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-08-23 19:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
--- Comment #5 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2023-August/059707.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2023-08-23 19:16 ` anlauf at gcc dot gnu.org
@ 2023-08-23 19:47 ` cvs-commit at gcc dot gnu.org
2023-08-23 19:50 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-23 19:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:829c0c06fe7ba2cf3e83508b95999b884b21236d
commit r14-3415-g829c0c06fe7ba2cf3e83508b95999b884b21236d
Author: Harald Anlauf <anlauf@gmx.de>
Date: Wed Aug 23 21:08:01 2023 +0200
Fortran: improve diagnostic message for COMMON with automatic object
[PR32986]
gcc/fortran/ChangeLog:
PR fortran/32986
* resolve.cc (is_non_constant_shape_array): Add forward
declaration.
(resolve_common_vars): Diagnose automatic array object in COMMON.
(resolve_symbol): Prevent confusing follow-on error.
gcc/testsuite/ChangeLog:
PR fortran/32986
* gfortran.dg/common_28.f90: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2023-08-23 19:47 ` cvs-commit at gcc dot gnu.org
@ 2023-08-23 19:50 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-08-23 19:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from anlauf at gcc dot gnu.org ---
Fixed in gcc-14.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
2007-08-04 13:08 [Bug fortran/32986] New: " burnus at gcc dot gnu dot org
2007-08-04 13:36 ` [Bug fortran/32986] " burnus at gcc dot gnu dot org
@ 2007-08-15 11:54 ` fxcoudert at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-15 11:54 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-15 11:54:10
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object
2007-08-04 13:08 [Bug fortran/32986] New: " burnus at gcc dot gnu dot org
@ 2007-08-04 13:36 ` burnus at gcc dot gnu dot org
2007-08-15 11:54 ` fxcoudert at gcc dot gnu dot org
1 sibling, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-04 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-08-04 13:36 -------
"C588 (R558) A common-block-object shall not be a dummy argument, an
allocatable variable, a derived-type object with an ultimate component that is
allocatable, an automatic object, a function name, an entry name, a variable
with the BIND attribute, or a result name."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32986
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-23 19:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-32986-4@http.gcc.gnu.org/bugzilla/>
2011-06-20 23:02 ` [Bug fortran/32986] Improve diagnostic message for COMMON with automatic object afhoffie at ncsu dot edu
2023-08-23 18:49 ` anlauf at gcc dot gnu.org
2023-08-23 19:16 ` anlauf at gcc dot gnu.org
2023-08-23 19:47 ` cvs-commit at gcc dot gnu.org
2023-08-23 19:50 ` anlauf at gcc dot gnu.org
2007-08-04 13:08 [Bug fortran/32986] New: " burnus at gcc dot gnu dot org
2007-08-04 13:36 ` [Bug fortran/32986] " burnus at gcc dot gnu dot org
2007-08-15 11:54 ` fxcoudert 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).