Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gnat.dg/opt39.adb @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
-- { dg-do compile } -- { dg-options "-O2 -fno-inline -fdump-tree-optimized" } procedure Opt39 (I : Integer) is type Rec is record I1 : Integer; I2 : Integer; I3 : Integer; I4 : Integer; I5 : Integer; end record; procedure Set (A : access Rec; I : Integer) is Tmp : Rec := A.all; begin Tmp.I1 := I; A.all := Tmp; end; R : aliased Rec; begin Set (R'Access, I); if R.I1 /= I then raise Program_Error; end if; end; -- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }