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

[Bug fortran/83900] [8 Regression] ICE in gfc_simplify_matmul, at fortran/simplify.c:4593


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83900

--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Sat, Jan 20, 2018 at 04:51:24PM +0000, sgk at troutmask dot
apl.washington.edu wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83900
> 
> --- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
> On Sat, Jan 20, 2018 at 03:22:50PM +0000, dominiq at lps dot ens.fr wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83900
> > 
> > --- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > The original test in comment 0 still fails at r256917 on darwin with
> > 
> > pr83900.f90:4:0:
> > 
> >     print *, matmul(a, b)
> > 
> > internal compiler error: in fold_convert_loc, at fold-const.c:2402
> > 
> > Should I reopen this PR or open a new one?
> > 
> 
> Interesting.  gfortran.dg/matmul_17.f90 is essentially the 
> code in comment #0 without the IO statement.  The backtrace
> in comment #0 is caused by the assert() I removed, which is
> bogus.  I think a new PR is needed.  It seems matmul is 
> hosed
> 
>    integer, parameter :: a(3,2) = 1
>    real, parameter :: b(2,3) = 2
>    real, parameter :: c(3,3) = matmul(a,b)
>    real d(3,3)
>    d = matmul(a,b)
>    print '(9F5.1)', c
>    print '(9F5.1)', d
> % gfcx -o z -fno-frontend-optimize a.f90
> % ./z
>   4.0  4.0  4.0  4.0  4.0  4.0  4.0  4.0  4.0
>   0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
> 
> -fno-frontend-optimize is  not needed to get the above.

Something is definitely odd in the tree dump.  Lines edited to get < 80 chars.

{
  real(kind=4) d[9];
  static real(kind=4) c[9] = {4., 4., 4., 4., 4., 4., 4., 4., 4.};

  {
    static real(kind=4) A.0[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0.};

    (void) __builtin_memcpy ((void *) &d, (void *) &A.0, 36);
    {
      struct __st_parameter_dt dt_parm.1;

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