[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-20 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 --- Comment #8 from Jerry DeLisle --- FWIW : I think the typespec is being lost because the initial call into gfc_match_array_constructor which finds and matches the typespec sets a local variable seen_ts which is used later in that function to

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-04 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 --- Comment #7 from Jerry DeLisle --- I should mention, this also fails: print *, [real:: ((/2, 3/))] ** 2 So we also have to deal with this. I think I have it figured out.

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-03 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 --- Comment #6 from Jerry DeLisle --- I had to go back in the Standard to deepen my understanding. Yes simplifying it would help. I think what we need to do is acknowledge that we should match '(' and if found, recursively call the gfc_match_a

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-02 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org ---

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-02 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 --- Comment #4 from Jerry DeLisle --- Well folks, I like to document my thought process. >From the 2022 draft standard we have: R781 ac-value is expr or ac-implied-do R782 ac-implied-do is ( ac-value-list , ac-implied-do-control ) In our

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-02-02 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 --- Comment #3 from Jerry DeLisle --- I have a copy of the standard so I will answer my own question. This is a comment: In a situation like this: print *, [integer :: ([1.0])] ** 2 My brain wants to say reject it because 1.0 is not an inte

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-01-29 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 Jerry DeLisle changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org --

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-01-29 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 Jerry DeLisle changed: What|Removed |Added CC||gs...@t-online.de --- Comment #1 from J

[Bug fortran/107721] Lost typespec with constant expressions using array constructors and parentheses

2023-01-29 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721 Jerry DeLisle changed: What|Removed |Added Ever confirmed|0 |1 CC|