public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors
@ 2023-12-03 17:56 pault at gcc dot gnu.org
2023-12-06 12:31 ` [Bug fortran/112834] " pault at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-12-03 17:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112834
Bug ID: 112834
Summary: Class array function selector causes chain of syntax
and other spurious errors
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: pault at gcc dot gnu.org
Target Milestone: ---
Created attachment 56777
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56777&action=edit
testcase demonstrating problem
The attached produces:
[pault@pc30 pr87477]$ rm ./a.out;~/grun/bin/gfortran test.f90
-fdump-tree-original -g;./a.out
test.f90:24:15:
24 | if (var1(2)%i .ne. test_array(2)%i) stop 9
| 1
Error: Syntax error in IF-expression at (1)
test.f90:31:16:
31 | if (x(1)%i .ne. test_array(1)%i) stop 11
| 1
Error: Syntax error in IF-expression at (1)
test.f90:39:52:
39 | print *, "yes, size of 'y' is ", size(y), y(1)
| 1
Error: Syntax error in PRINT statement at (1)
test.f90:44:26:
44 | end module class_selectors
| 1
Error: Pointer assignment target in initialization expression does not have the
TARGET attribute at (1)
test.f90:46:7:
46 | use class_selectors
| 1
Fatal Error: Cannot open module file ‘class_selectors.mod’ for reading at (1):
No such file or directory
compilation terminated
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/112834] Class array function selector causes chain of syntax and other spurious errors
2023-12-03 17:56 [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors pault at gcc dot gnu.org
@ 2023-12-06 12:31 ` pault at gcc dot gnu.org
2023-12-06 12:33 ` pault at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-12-06 12:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112834
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
Last reconfirmed| |2023-12-06
CC| |pault at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 56814
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56814&action=edit
Fix for this PR
I will be submitting this to the list this evening.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/112834] Class array function selector causes chain of syntax and other spurious errors
2023-12-03 17:56 [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors pault at gcc dot gnu.org
2023-12-06 12:31 ` [Bug fortran/112834] " pault at gcc dot gnu.org
@ 2023-12-06 12:33 ` pault at gcc dot gnu.org
2023-12-16 13:27 ` cvs-commit at gcc dot gnu.org
2024-03-06 15:19 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2023-12-06 12:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112834
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |87477
--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
Flagging as a blocker to PR87477.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87477
[Bug 87477] [meta-bug] [F03] issues concerning the ASSOCIATE statement
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/112834] Class array function selector causes chain of syntax and other spurious errors
2023-12-03 17:56 [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors pault at gcc dot gnu.org
2023-12-06 12:31 ` [Bug fortran/112834] " pault at gcc dot gnu.org
2023-12-06 12:33 ` pault at gcc dot gnu.org
@ 2023-12-16 13:27 ` cvs-commit at gcc dot gnu.org
2024-03-06 15:19 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-16 13:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112834
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:5ae6f524f5d4ee2ab79ba797fa4901daf90afb25
commit r14-6620-g5ae6f524f5d4ee2ab79ba797fa4901daf90afb25
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Sat Dec 16 13:26:47 2023 +0000
Fortran: Fix problems with class array function selectors [PR112834]
2023-12-16 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/112834
* match.cc (build_associate_name): Fix whitespace issues.
(select_type_set_tmp): If the selector is of unknown type, go
the SELECT TYPE selector to see if this is a function and, if
the result is available, use its typespec.
* parse.cc (parse_associate): Again, use the function result if
the type of the selector result is unknown.
* trans-stmt.cc (trans_associate_var): The expression has to be
of type class, for class_target to be true. Convert and fix
class functions. Pass the fixed expression.
PR fortran/111853
* resolve.cc (gfc_expression_rank): Avoid null dereference.
gcc/testsuite/
PR fortran/112834
* gfortran.dg/associate_63.f90 : New test.
PR fortran/111853
* gfortran.dg/pr111853.f90 : New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/112834] Class array function selector causes chain of syntax and other spurious errors
2023-12-03 17:56 [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors pault at gcc dot gnu.org
` (2 preceding siblings ...)
2023-12-16 13:27 ` cvs-commit at gcc dot gnu.org
@ 2024-03-06 15:19 ` pault at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu.org @ 2024-03-06 15:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112834
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on mainline.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-06 15:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-03 17:56 [Bug fortran/112834] New: Class array function selector causes chain of syntax and other spurious errors pault at gcc dot gnu.org
2023-12-06 12:31 ` [Bug fortran/112834] " pault at gcc dot gnu.org
2023-12-06 12:33 ` pault at gcc dot gnu.org
2023-12-16 13:27 ` cvs-commit at gcc dot gnu.org
2024-03-06 15:19 ` pault 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).