public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939)
@ 2011-09-28 9:10 zeccav at gmail dot com
2013-06-22 15:20 ` [Bug fortran/50549] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2011-09-28 9:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
Bug #: 50549
Summary: should detect different type parameters in structure
constructors (r178939)
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeccav@gmail.com
! should detect different type parameters in structure constructors (r178939)
interface
function f1()
character(1),pointer :: f1
end
end interface
type t
character(2), pointer :: p2
end type
character(1), pointer :: p1
type(t) u
u=t(p1) ! different character length
u=t(f1()) ! type parameters are different (Fortran 95 section 4.4.4)
end
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
@ 2013-06-22 15:20 ` dominiq at lps dot ens.fr
2021-02-27 8:27 ` zeccav at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-22 15:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-06-22
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at revision 200321.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
2013-06-22 15:20 ` [Bug fortran/50549] " dominiq at lps dot ens.fr
@ 2021-02-27 8:27 ` zeccav at gmail dot com
2022-03-24 21:13 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: zeccav at gmail dot com @ 2021-02-27 8:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
--- Comment #2 from Vittorio Zecca <zeccav at gmail dot com> ---
Still present on version 11.
NAG nagfor compiler detecs it.
nagfor -S gfbug87.f -w
NAG Fortran Compiler Release 7.0(Yurakucho) Build 7042
Error: gfbug87.f, line 13: Wrong character length (1 instead of 2) for pointer
component P2 in constructor for type T
Error: gfbug87.f, line 14: Wrong character length (1 instead of 2) for pointer
component P2 in constructor for type T
[NAG Fortran Compiler error termination, 2 errors]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
2013-06-22 15:20 ` [Bug fortran/50549] " dominiq at lps dot ens.fr
2021-02-27 8:27 ` zeccav at gmail dot com
@ 2022-03-24 21:13 ` anlauf at gcc dot gnu.org
2022-03-27 19:45 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-03-24 21:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
Created attachment 52683
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52683&action=edit
Tentative patch
This patch provides an error message somewhat similar to NAG, e.g.
pr50549.f90:13:6:
13 | u=t(p1) ! different character length
| 1
Error: Unequal character lengths (2/1) for pointer component 'p2' in
constructor at (1)
Regtesting looks fine.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
` (2 preceding siblings ...)
2022-03-24 21:13 ` anlauf at gcc dot gnu.org
@ 2022-03-27 19:45 ` anlauf at gcc dot gnu.org
2022-03-29 18:36 ` cvs-commit at gcc dot gnu.org
2022-03-29 18:49 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-03-27 19:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-March/057710.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
` (3 preceding siblings ...)
2022-03-27 19:45 ` anlauf at gcc dot gnu.org
@ 2022-03-29 18:36 ` cvs-commit at gcc dot gnu.org
2022-03-29 18:49 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-29 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
--- Comment #5 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:0712f356374c2cf26015cccfa3141537e42cbb12
commit r12-7900-g0712f356374c2cf26015cccfa3141537e42cbb12
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Mar 27 21:35:15 2022 +0200
Fortran: character length of pointer assignments in structure constructors
gcc/fortran/ChangeLog:
PR fortran/50549
* resolve.cc (resolve_structure_cons): Reject pointer assignments
of character with different lengths in structure constructor.
gcc/testsuite/ChangeLog:
PR fortran/50549
* gfortran.dg/char_pointer_assign_7.f90: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/50549] should detect different type parameters in structure constructors (r178939)
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
` (4 preceding siblings ...)
2022-03-29 18:36 ` cvs-commit at gcc dot gnu.org
@ 2022-03-29 18:49 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-03-29 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50549
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |12.0
Status|ASSIGNED |RESOLVED
--- Comment #6 from anlauf at gcc dot gnu.org ---
Fixed for gcc-12. Closing.
Sorry that it took so long.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-29 18:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 9:10 [Bug fortran/50549] New: should detect different type parameters in structure constructors (r178939) zeccav at gmail dot com
2013-06-22 15:20 ` [Bug fortran/50549] " dominiq at lps dot ens.fr
2021-02-27 8:27 ` zeccav at gmail dot com
2022-03-24 21:13 ` anlauf at gcc dot gnu.org
2022-03-27 19:45 ` anlauf at gcc dot gnu.org
2022-03-29 18:36 ` cvs-commit at gcc dot gnu.org
2022-03-29 18:49 ` anlauf 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).