[Patch, Fortran] PR 47399 - fix half of the PR: ICE with PARAMETER TBP

Jerry DeLisle jvdelisle@frontier.com
Sat Jan 22 14:18:00 GMT 2011

On 01/22/2011 02:18 AM, Tobias Burnus wrote:
> The fix for the ICE is simple: Just modifying the gcc_assert is enough.
> The patch below only fixes that part.
> OK for the trunk?

Yes, OK

Regarding below, to which standard do we accept invalid?  If it is pre F2003 or 
F2008, I would forget about it.  Who cares?


> * * *
> The accept invalid part of the PR is much harder. Seemingly someone could not
> correctly read when creating gfc_is_constant_expr as the function also allows
> specification expressions.
> Fortran 95 has two confusing close concepts, initialization expressions and
> constant expressions; both reduce to a constant at compile time - and I have not
> yet fully deciphered what their difference is. In Fortran 2003 both are combined
> to "initialization expressions" and Fortran 2008 renamed those to "constant
> expressions".
> Thus, changing gfc_is_constant_expr should be done, but the problem is that some
> of the callers indeed want to check for specification expressions (or something
> related like restricted expressions or ...). Thus, one needs to go through
> F95/F2003/F2008 and check the concepts and then check all 56 callers of
> gfc_is_constant_expr to see which check they actually want...
> Tobias

More information about the Gcc-patches mailing list