[Ada] Spurious error on pragma Independent_Components
This patch modifies the analysis of pragma Independent_Components to account
for a side effect from handling of self-referential records which render the
pragma illegal.
------------
-- Source --
------------
-- pack.ads
package Pack is
type OK is record
Comp_1 : Integer;
Comp_2 : access OK;
end record;
pragma Independent_Components (OK);
type Error;
pragma Independent_Components (Error);
type Error is record
Comp : Integer;
end record;
end Pack;
----------------------------
-- Compilation and output --
----------------------------
$ gcc -c pack.ads
pack.ads:9:04: representation item must be after full type declaration
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Use the full view of an internally
generated incomplete type.
From-SVN: r260649