[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 15 11:36:00 GMT 2013


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-01-15 11:36:05 UTC ---
(In reply to comment #3)
>   y.data = 0B;
>     void * D.1914;
> 
>     D.1914 = _gfortran_internal_pack (&y);
>     a4t2 (D.1914);

Looks as if code of the form:

  if (y.data)
    D.1914 = _gfortran_internal_pack (&y);
  else
    D.1914 = NULL;

is missing - at least for "(gfc_option.allow_std & GFC_STD_F2008) != 0". I
assume that there is (implicitly?) a check for "y == NULL" for optional
dummies. (The latter is not applicable to the reduced example, but to line 39
of class_optional_2.f90.)



More information about the Gcc-bugs mailing list