This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47803] [F95+] Constant inquiry function rejected in PARAMETER definition
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 14 Mar 2018 00:32:36 +0000
- Subject: [Bug fortran/47803] [F95+] Constant inquiry function rejected in PARAMETER definition
- Auto-submitted: auto-generated
- References: <bug-47803-4@http.gcc.gnu.org/bugzilla/>
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.