public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET
@ 2011-12-18 18:34 burnus at gcc dot gnu.org
2013-06-11 19:16 ` [Bug fortran/51610] " dominiq at lps dot ens.fr
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-18 18:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
Bug #: 51610
Summary: [OOP] Class container does not properly handle POINTER
and TARGET
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: accepts-invalid, rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@gcc.gnu.org, pault@gcc.gnu.org
Blocks: 51605
The following program compiles - but it is invalid.
1. The TARGET attribute is required for "b" and "c"
But if one tries to set it, one gets an error.
Expected: One can mark them as TARGET and without one gets an error
for the CALL.
2. The "ptr => x" is invalid as "x" is not TARGET but no error is printed.
3. If one swaps the "x" and the "z" lines, one gets the error:
ptr => x
1
Error: Non-POINTER in pointer association context (pointer assignment)
But one get also an error for the "ptr => y" and "ptr => z" lines.
Related is PR 51605: SELECT TYPE's associate-name needs to set TARGET attribute
type t
end type t
class(t), allocatable :: a(:), b(:), c(:)
! Bogus error: Error: Duplicate TARGET attribute specified
! target :: a, b, c
allocate (a(1), b(1), c(1))
! Requires: TARGET attribute -
call test(a, b, c) ! possibly not correctly diagnosed
contains
subroutine test(x, y, z)
class(t), pointer, intent(in) :: z(:)
class(t), target :: y(3)
class(t) :: x(3)
class(t), pointer :: ptr(:)
ptr => x ! Invalid: "x" is not a TARGET
ptr => y ! Valid: "x" is a TARGET
ptr => z ! Valid: "z" is a POINTER
end subroutine
end
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
@ 2013-06-11 19:16 ` dominiq at lps dot ens.fr
2013-06-17 15:07 ` dominiq at lps dot ens.fr
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-11 19:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-06-11
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
With 4.8.1 and trunk, I get
pr51610.f90:15.15:
ptr => x ! Invalid: "x" is not a TARGET
1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
pr51610.f90:8.23:
call test(a, b, c) ! possibly not correctly diagnosed
1
Error: Actual argument for 'z' must be a pointer at (1)
Confirmed for 4.7.3. This PR could probably be closed as fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
2013-06-11 19:16 ` [Bug fortran/51610] " dominiq at lps dot ens.fr
@ 2013-06-17 15:07 ` dominiq at lps dot ens.fr
2013-12-14 20:15 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-17 15:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Waiting.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
2013-06-11 19:16 ` [Bug fortran/51610] " dominiq at lps dot ens.fr
2013-06-17 15:07 ` dominiq at lps dot ens.fr
@ 2013-12-14 20:15 ` dominiq at lps dot ens.fr
2013-12-14 22:25 ` janus at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-14 20:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
No feedback since six months. Closing as FIXED. Please open a new PR if
I have missed any remaining issue.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2013-12-14 20:15 ` dominiq at lps dot ens.fr
@ 2013-12-14 22:25 ` janus at gcc dot gnu.org
2013-12-17 16:19 ` dominiq at lps dot ens.fr
2023-03-06 17:18 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: janus at gcc dot gnu.org @ 2013-12-14 22:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #4 from janus at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #3)
> No feedback since six months. Closing as FIXED. Please open a new PR if
> I have missed any remaining issue.
AFAICS, we still get the bogus error:
target :: a, b, c
1
Error: Duplicate TARGET attribute specified at (1)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
` (3 preceding siblings ...)
2013-12-14 22:25 ` janus at gcc dot gnu.org
@ 2013-12-17 16:19 ` dominiq at lps dot ens.fr
2023-03-06 17:18 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-17 16:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> AFAICS, we still get the bogus error:
>
> target :: a, b, c
> 1
> Error: Duplicate TARGET attribute specified at (1)
Reduced test:
type t
end type t
class(t), allocatable :: a(:), b(:), c(:)
! Bogus error: Error: Duplicate TARGET attribute specified
target :: a, b, c
end
There is no error if CLASS is replaced with TYPE or REAL. I still think it
would be better to have a new PR opened for it.
BTW I think the test in comment 1 is invalid due to
...
allocate (a(1), b(1), c(1))
...
class(t), target :: y(3)
class(t) :: x(3)
...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/51610] [OOP] Class container does not properly handle POINTER and TARGET
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
` (4 preceding siblings ...)
2013-12-17 16:19 ` dominiq at lps dot ens.fr
@ 2023-03-06 17:18 ` anlauf at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-03-06 17:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51610
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #6 from anlauf at gcc dot gnu.org ---
Duplicate.
*** This bug has been marked as a duplicate of bug 106856 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-06 17:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-18 18:34 [Bug fortran/51610] New: [OOP] Class container does not properly handle POINTER and TARGET burnus at gcc dot gnu.org
2013-06-11 19:16 ` [Bug fortran/51610] " dominiq at lps dot ens.fr
2013-06-17 15:07 ` dominiq at lps dot ens.fr
2013-12-14 20:15 ` dominiq at lps dot ens.fr
2013-12-14 22:25 ` janus at gcc dot gnu.org
2013-12-17 16:19 ` dominiq at lps dot ens.fr
2023-03-06 17:18 ` 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).