~angelsl/ubuntu/wily/gcc-5/mips-cross

« back to all changes in this revision

Viewing changes to debian/patches/pr47818.diff

  • Committer: angelsl
  • Date: 2015-10-30 03:30:35 UTC
  • Revision ID: angelsl-20151030033035-rmug41zm8hyjgisg
Original import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Fix PR ada/47818: Pragma Assert is rejected with No_Implementation_Pragmas restriction.
 
2
 
 
3
Index: b/src/gcc/ada/sem_prag.adb
 
4
===================================================================
 
5
--- a/src/gcc/ada/sem_prag.adb
 
6
+++ b/src/gcc/ada/sem_prag.adb
 
7
@@ -11334,7 +11334,16 @@ package body Sem_Prag is
 
8
             Str   : Node_Id;
 
9
 
 
10
          begin
 
11
-            GNAT_Pragma;
 
12
+            --  This could be a rewritten pragma Assert. If it is the case
 
13
+            --  then don't check restrictions, because they are different for
 
14
+            --  pragma Assert and were already checked.
 
15
+
 
16
+            if Nkind (Original_Node (N)) /= N_Pragma
 
17
+              or else Pragma_Name (Original_Node (N)) /= Name_Assert
 
18
+            then
 
19
+               GNAT_Pragma;
 
20
+            end if;
 
21
+
 
22
             Check_At_Least_N_Arguments (2);
 
23
             Check_At_Most_N_Arguments (3);
 
24
             Check_Optional_Identifier (Arg1, Name_Name);