[Ada] Fix bogus compilation error with Elaborate_Body and -gnatN
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 19 Aug 2019 08:37:28 +0000 (08:37 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 19 Aug 2019 08:37:28 +0000 (08:37 +0000)
commit8fafa0b42000f5fa0284f8e3308f233a41843461
treece45a4edde11db39c89e24ba0f81d0fe935e479e
parentbfa6962fc25e2e24b3a5299095e933f9b57bb6e0
[Ada] Fix bogus compilation error with Elaborate_Body and -gnatN

This fixes a bogus compilation error when a unit with SPARK_Mode
containing a pragma Elaborate_Body is with-ed by a generic unit
containing an inlined subprogram, and front-end inlining is enabled.

2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_prag.adb (Is_Before_First_Decl): Deal with rewritten
pragmas.

gcc/testsuite/

* gnat.dg/elab8.adb, gnat.dg/elab8_gen.adb,
gnat.dg/elab8_gen.ads, gnat.dg/elab8_pkg.adb,
gnat.dg/elab8_pkg.ads: New testcase.

From-SVN: r274664
gcc/ada/ChangeLog
gcc/ada/sem_prag.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/elab8.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab8_gen.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab8_gen.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab8_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/elab8_pkg.ads [new file with mode: 0644]