public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails
@ 2021-06-08 8:46 mscfd at gmx dot net
2021-06-08 15:52 ` [Bug fortran/100961] " dominiq at lps dot ens.fr
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: mscfd at gmx dot net @ 2021-06-08 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
Bug ID: 100961
Summary: Intrinsic function as value to a class(*) assumed rank
argument fails
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mscfd at gmx dot net
Target Milestone: ---
Created attachment 50961
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50961&action=edit
test case
Providing the value of an intrinsic function to a subroutine with an class(*)
assumed rank argument fails. The correct rank is not recognised.
Encapsulating the intrinsic function invocation in parenthesis avoids the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100961] Intrinsic function as value to a class(*) assumed rank argument fails
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
@ 2021-06-08 15:52 ` dominiq at lps dot ens.fr
2021-06-09 5:15 ` mscfd at gmx dot net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-06-08 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-06-08
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
AFAIU the test it works for me with GCC10, 11, and 12.
What is tour output of
Fortran -v?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100961] Intrinsic function as value to a class(*) assumed rank argument fails
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
2021-06-08 15:52 ` [Bug fortran/100961] " dominiq at lps dot ens.fr
@ 2021-06-09 5:15 ` mscfd at gmx dot net
2021-06-09 5:22 ` mscfd at gmx dot net
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mscfd at gmx dot net @ 2021-06-09 5:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
--- Comment #2 from martin <mscfd at gmx dot net> ---
It is releases/gcc-11.1.0:
Using built-in specs.
COLLECT_GCC=gfortran-11
COLLECT_LTO_WRAPPER=.../gcc/lib/gcc/x86_64-linux-gnu/11.1.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-repo/configure --program-suffix=-11
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-arch=westmere --prefix=.../gcc --enable-languages=c,c++,fortran
--disable-multilib --disable-bootstrap --enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.1.0 (GCC)
The code is compiled with "-g select_rank_expression.f90 -o
select_rank_expression.x".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100961] Intrinsic function as value to a class(*) assumed rank argument fails
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
2021-06-08 15:52 ` [Bug fortran/100961] " dominiq at lps dot ens.fr
2021-06-09 5:15 ` mscfd at gmx dot net
@ 2021-06-09 5:22 ` mscfd at gmx dot net
2022-01-25 8:53 ` mscfd at gmx dot net
2023-05-09 19:13 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mscfd at gmx dot net @ 2021-06-09 5:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
--- Comment #3 from martin <mscfd at gmx dot net> ---
Created attachment 50968
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50968&action=edit
second test case which segfaults
Playing around with some variants in select_rank_expression2.f90, I can see
that I sometimes get correct results, sometimes the rank is correctly
recognised, but not the type, and (as is the case for attachment
select_rank_expression2.f90) it even can segfault with an invalid memory
access. I get all these behaviours by selecting different sets of the four
"call p(..)" lines and varying the order in which they are executed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100961] Intrinsic function as value to a class(*) assumed rank argument fails
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
` (2 preceding siblings ...)
2021-06-09 5:22 ` mscfd at gmx dot net
@ 2022-01-25 8:53 ` mscfd at gmx dot net
2023-05-09 19:13 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mscfd at gmx dot net @ 2022-01-25 8:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
--- Comment #4 from martin <mscfd at gmx dot net> ---
In contrast to gfortran-11, with current master I do not see any errors or
segfaults (not even with valgrind) anymore. Seems to have been fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100961] Intrinsic function as value to a class(*) assumed rank argument fails
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
` (3 preceding siblings ...)
2022-01-25 8:53 ` mscfd at gmx dot net
@ 2023-05-09 19:13 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-05-09 19:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100961
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Known to fail| |9.5.0
Status|WAITING |RESOLVED
Known to work| |10.4.0, 11.3.0, 12.2.0
--- Comment #5 from anlauf at gcc dot gnu.org ---
Adding known-to-work / known-to-fail versions.
Closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-09 19:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 8:46 [Bug fortran/100961] New: Intrinsic function as value to a class(*) assumed rank argument fails mscfd at gmx dot net
2021-06-08 15:52 ` [Bug fortran/100961] " dominiq at lps dot ens.fr
2021-06-09 5:15 ` mscfd at gmx dot net
2021-06-09 5:22 ` mscfd at gmx dot net
2022-01-25 8:53 ` mscfd at gmx dot net
2023-05-09 19:13 ` 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).