This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

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


On Sat, Jan 22, 2011 at 11:18:02AM +0100, Tobias Burnus wrote:
> 
> 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...
> 

I suspect that there are definitely many obscure bugs
lurking in the constant/initialization/specification
handling.  There are at least 10 PR about c/i/s
statements.  I stop counting when I found PR 38822,
which was the one I was looking for.  This is a PR
due to James van Buskirk code.  See comment #8 for
one (subtle?) difference between i and s statements.

For the record: 25095, 25104, 29962, 31292, 31560,
31592, 32365, 34663, 35040, and 38822.

PS: I think we can close 32151.  The error message may
not be too appropriate, but with trunk the error locus
points right at the problem.

-- 
Steve


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