http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46641

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |36437, 45824

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-11-24 
14:53:27 UTC ---
(In reply to comment #0)
> In terms of validity, the question is whether
>    C_SIZEOF (structure-constructor ())
> is a valid initialization expression -- gfortran accepts it.

I marked the PR now as regression as gfortran 4.5 accepts it - but does not
have the segfault issue at run time.

That issue seems to be related to the compile-time simplification - or rather
the lack of. Both 4.5 and 4.6 produce the dump:

  character(kind=1) str[1:.str];

TODO:
a) Fix the issue above, cf. PR 36437

b) decide which of the various c_sizeof/sizeof is valid and thus should be
accepted or rejected; look also at the the thread (cf. comment 0) and in
particular at
http://groups.google.com/group/comp.lang.fortran/msg/8b36b578793b7037 , cf.
also PR 45824

Reply via email to