diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2010-05-04 17:47:52 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2010-05-04 17:47:52 +0000 |
commit | 7ef5e86ccb012a8ffb048e24d77df6d1726c1e20 (patch) | |
tree | 9c07bd40cf2fbaf22796139526d1ed47478b6791 /gcc/testsuite | |
parent | 6cbd3b6a699912ff879d13c0fb5ab3f4b244943f (diff) | |
download | gcc-7ef5e86ccb012a8ffb048e24d77df6d1726c1e20.zip gcc-7ef5e86ccb012a8ffb048e24d77df6d1726c1e20.tar.gz gcc-7ef5e86ccb012a8ffb048e24d77df6d1726c1e20.tar.bz2 |
tree.c (free_lang_data_in_one_sizepos): New inline function.
* tree.c (free_lang_data_in_one_sizepos): New inline function.
(free_lang_data_in_type): Call it on TYPE_{MIN|MAX}_VALUE of numerical
types. Call it on TYPE_SIZE and TYPE_SIZE_UNIT of all types.
(free_lang_data_in_decl): Call it on DECL_SIZE and DECL_SIZE_UNIT of
all decls. Call it on DECL_FIELD_OFFSET of fields.
(find_decls_types_r): Follow DECL_VALUE_EXPR.
(iterative_hash_expr) <PLACEHOLDER_EXPR>: New case.
From-SVN: r159039
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto1.adb | 14 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto1_pkg.adb | 23 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto1_pkg.ads | 23 |
4 files changed, 65 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5822278..1ad5bc0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-05-04 Eric Botcazou <ebotcazou@adacore.com> + + * gnat.dg/lto1.adb: New test. + * gnat.dg/lto1_pkg.ad[sb]: New helper. + 2010-05-04 H.J. Lu <hongjiu.lu@intel.com> PR middle-end/43671 diff --git a/gcc/testsuite/gnat.dg/lto1.adb b/gcc/testsuite/gnat.dg/lto1.adb new file mode 100644 index 0000000..085094e --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto1.adb @@ -0,0 +1,14 @@ +-- PR ada/43106 +-- Testcase by Bill Neven <neven@hitt.nl> + +-- { dg-do run } +-- { dg-options "-O2 -flto" } + +with Lto1_Pkg; use Lto1_Pkg; + +procedure Lto1 is + Radar : Radar_T; +begin + Radar.Sensor_Type := radcmb; + Initialize (Radar); +end; diff --git a/gcc/testsuite/gnat.dg/lto1_pkg.adb b/gcc/testsuite/gnat.dg/lto1_pkg.adb new file mode 100644 index 0000000..99955a8 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto1_pkg.adb @@ -0,0 +1,23 @@ +package body Lto1_Pkg is + + procedure Initialize (Radar : in Radar_T) is + Antenna1 : Antenna_Type_T; + Antenna2 : Antenna_Type_T; + begin + case Radar.Sensor_Type is + when radpr | radssr => + Antenna1 := Radar.Sensor_Type; + Antenna2 := Radar.Sensor_Type; + when radcmb => + Antenna1 := radpr; + Antenna2 := radssr; + when others => + Antenna1 := radpr; + Antenna2 := radssr; + end case; + if Antenna1 /= radpr or Antenna2 /= radssr then + raise Program_Error; + end if; + end Initialize; + +end Lto1_Pkg; diff --git a/gcc/testsuite/gnat.dg/lto1_pkg.ads b/gcc/testsuite/gnat.dg/lto1_pkg.ads new file mode 100644 index 0000000..33c9bc9 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto1_pkg.ads @@ -0,0 +1,23 @@ +package Lto1_Pkg is + + type Unsigned_64 is mod 2 ** 64; + + type Associated_Report_T is (miss, radpr, radssr, radcmb); + + -- sensor type : primary, secondary, co-rotating (combined) + subtype Sensor_Type_T is Associated_Report_T; -- range radpr .. radcmb; + subtype Antenna_Type_T is Sensor_Type_T range radpr .. radssr; + + type Filtering_Level_T is (none, pr_in_clutter, ssr_plots, pr_plots); + type Filtering_Levels_T is array (Filtering_Level_T) of boolean; + + type Radar_T is record + External_Sensor_ID : Unsigned_64; + Dual_Radar_Index : Integer; + Compatible_Filtering_Levels : Filtering_Levels_T; + Sensor_Type : Sensor_Type_T; + end record; + + procedure Initialize (Radar : in Radar_T); + +end Lto1_Pkg; |