[Ada] Fix spurious alignment warning on simple address clause
This eliminates a spurious alignment warning given by the compiler on an
address clause when the No_Exception_Propagation restriction is in
effect and the -gnatw.x switch is used. In this configuration the
address clauses whose expression is itself of the form X'Address would
not be sufficiently analyzed and, therefore, the compiler might give
false positive warnings.
2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* checks.ads (Alignment_Warnings_Record): Add P component.
* checks.adb (Apply_Address_Clause_Check): Be prepared to kill
the warning also if the clause is of the form X'Address.
(Validate_Alignment_Check_Warning): Kill the warning if the
clause is of the form X'Address and the alignment of X is
compatible.
gcc/testsuite/
* gnat.dg/warn31.adb, gnat.dg/warn31.ads: New testcase.
From-SVN: r275865