URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 304 |
Rev 338 |
-- { dg-do compile }
|
-- { dg-do compile }
|
-- { dg-options "-O2 -gnatp -fdump-tree-optimized" }
|
-- { dg-options "-O2 -gnatp -fdump-tree-optimized" }
|
|
|
-- The raise statement must be optimized away by
|
-- The raise statement must be optimized away by
|
-- virtue of DECL_NONADDRESSABLE_P set on R.I.
|
-- virtue of DECL_NONADDRESSABLE_P set on R.I.
|
|
|
package body Aliasing1 is
|
package body Aliasing1 is
|
|
|
function F (P : Ptr) return Integer is
|
function F (P : Ptr) return Integer is
|
begin
|
begin
|
R.I := 0;
|
R.I := 0;
|
P.all := 1;
|
P.all := 1;
|
if R.I /= 0 then
|
if R.I /= 0 then
|
raise Program_Error;
|
raise Program_Error;
|
end if;
|
end if;
|
return 0;
|
return 0;
|
end;
|
end;
|
|
|
end Aliasing1;
|
end Aliasing1;
|
|
|
-- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
|
-- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
|
-- { dg-final { cleanup-tree-dump "optimized" } }
|
-- { dg-final { cleanup-tree-dump "optimized" } }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.