1-- PR ada/46192
2-- Testcase by Rolf Ebert <rolf.ebert.gcc@gmx.de>
3
4-- { dg-do compile }
5-- { dg-options "-O2 -fdump-tree-optimized" }
6
7with System; use System;
8
9package body Renaming5 is
10
11   type Bits_In_Byte is array (0 .. 7) of Boolean;
12   pragma Pack (Bits_In_Byte);
13
14   A : Bits_In_Byte;
15   for A'Address use System'To_Address(16#c0#);
16   pragma Volatile (A);
17
18   B : Bits_In_Byte renames A;
19
20   procedure Proc is
21   begin
22      while B (0) = False loop
23         null;
24      end loop;
25   end;
26
27end Renaming5;
28
29-- { dg-final { scan-tree-dump-times "goto" 2 "optimized" } }
30