From: Piotr Trojanek Date: Wed, 30 May 2018 08:57:26 +0000 (+0000) Subject: [Ada] Simplify conditions by removing always true conjuncts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81c8f261d7c09b5dff140a604f0743f75827c647;p=gcc.git [Ada] Simplify conditions by removing always true conjuncts Checking "Original_Node (N) /= N" is equivalent to "Is_Rewrite_Substitution (N)", which is checked just two lines before. Trivial simplification, semantics unaffected. 2018-05-30 Piotr Trojanek gcc/ada/ * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true. From-SVN: r260934 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e14d14eb32d..c6bd08bc50b 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-05-30 Piotr Trojanek + + * sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true. + 2018-05-30 Hristian Kirtchev * sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index ae340aade44..4547ef1d78e 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -11104,7 +11104,7 @@ package body Sem_Prag is -- Here to start processing for recognized pragma - Pname := Original_Aspect_Pragma_Name (N); + Pname := Original_Aspect_Pragma_Name (N); -- Capture setting of Opt.Uneval_Old @@ -11135,7 +11135,6 @@ package body Sem_Prag is elsif Is_Rewrite_Substitution (N) and then Nkind (Original_Node (N)) = N_Pragma - and then Original_Node (N) /= N then Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N))); @@ -13293,7 +13292,6 @@ package body Sem_Prag is elsif Is_Rewrite_Substitution (N) and then Nkind (Original_Node (N)) = N_Pragma - and then Original_Node (N) /= N then Set_Is_Ignored (N, Is_Ignored (Original_Node (N))); Set_Is_Checked (N, Is_Checked (Original_Node (N)));