This is the mail archive of the gcc-patches@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]

Re: [patch] Fix tree-optimization/91169


> Testing went OK but it looks like acats doesn't honor
> RUNTESTFLAGS so I got no multilib testing for it :/
> And the PR didn't contain sth I could plug into gnat.dg so I checked
> with visual inspection of dumps on the reduced testcase.

Sorry about that, gnat.dg/array37.adb now attached.

> I notice pretty-printing is also confused about the wrapping ;)
> 
>   static struct p__intarray___PAD intarray = {.F={-100, [0]=0, 100}};
> 
> the [0]= is not necessary.
> 
> Anyway, I can see bogus IL before and still after the proposed patch :/
> This is because I forgot to adjust cfield handling of setting index.
> 
> So I'm testing the adjusted patch attached which fixes the IL
> and for testing have patched gcc/testsuite/ada/acats/run_all.sh
> to add -m32.

Thanks!

-- 
Eric Botcazou
-- { dg-do run }
-- { dg-options "-O" }

procedure Array37 is

  type Arr is array (Integer range -1 .. 1) of Integer;

  A : Arr := (-100, 0, 100);

  function Ident (I : Integer) return Integer IS
  begin
    return I;
  end;

begin
  if Ident (A (1)) <= Ident (A (0)) then
    raise Program_Error;
  end if;
end;

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