This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47803] [F95+] Constant inquiry function rejected in PARAMETER definition


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47803

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Harald Anlauf from comment #4)
> Replacing the line
> 
>   INTEGER :: A(int(1))
> 
> in comment #0 by
> 
>   INTEGER :: A(1)
> 
> or
> 
>   INTEGER :: A(1+0)
> 
> works, but other variants like
> 
>   INTEGER :: A((1))
> 
> fail.
> 
> Apparently some attempt to simplify is missing.
> I think I've seen related PRs or duplicates.

Yep, gfortran is missing a simplification.  When
simplification of size(a) occurs, the int(1) is
still an expression with EXPR_FUNCTION.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]