@@ -5979,9 +5979,14 @@ package body Sem_Prag is
Prag := Stmt;
-- Skip declarations and statements generated by
- -- the compiler during expansion.
+ -- the compiler during expansion. Note that some
+ -- source statements (e.g. pragma Assert) may have
+ -- been transformed so that they do not appear as
+ -- coming from source anymore, so we instead look
+ -- at their Original_Node.
- elsif not Comes_From_Source (Stmt) then
+ elsif not Comes_From_Source (Original_Node (Stmt))
+ then
null;
-- A non-pragma is separating the group from the