On Tue, Oct 21, 2025 at 02:34:54AM +0800, Yuao Ma wrote:
> Hi Steve,
> 
> On Tue, Oct 21, 2025 at 2:18 AM Steve Kargl
> <[email protected]> wrote:
> > I don't have the patch installed, so cannot directly test;
> > but, the above is technically a invalid program.  'cc' is
> > referenced but never defined.  I would expect a warning
> > with -Wall and an ICE is possible as  'cc' can be using
> > whatever is in memory.
> 
> This program is merely a POC provided by Tobias, separate from the
> patch itself. I have, however, resolved the issue involving the
> character type and nil.
> 

If POC means "proof of concept", then what are you trying
to prove; that gfortran can compile invalid Fortran?

It seems I trimmed to much in my original observation.  
Tobias wrote:

   I found a test that fails with an ICE (segmentation fault)
   in generic_simplify_COND_EXPR, called by gfc_conv_conditional_expr:

   implicit none
   interface
     subroutine sub(x)
       character(*), optional :: x
     end
  end interface
  logical :: cc
  call sub( (cc ? "132" : .nil.))
  end

  I have not checked, but I assume that it has a NULL_TREE
  instead of passing '0' as length. I think that should be
  gfc_index_zero_node but I have not checked.

As the code is invalid, passing a NULL_TREE is as valid as
passing '0' for the length.

-- 
Steve

Reply via email to