[Ada] Fix oversight in Eval_Attribute for Bit_Position
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 13 Aug 2020 16:19:49 +0000 (18:19 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 22 Oct 2020 12:11:20 +0000 (08:11 -0400)
gcc/ada/

* sem_attr.adb (Eval_Attribute): Fix oversight for Bit_Position.

gcc/ada/sem_attr.adb

index fcb04a2c62b23f56b96736b933469c926d39ca3f..9e7699f4d3238d9ebebc0807cec500e452d6db48 100644 (file)
@@ -7914,7 +7914,7 @@ package body Sem_Attr is
 
                if Known_Static_Component_Bit_Offset (CE) then
                   Compile_Time_Known_Attribute
-                    (N, Component_Bit_Offset (Entity (P)));
+                    (N, Component_Bit_Offset (CE));
                else
                   Check_Expressions;
                end if;