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