summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-10-20 15:08:36 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2017-10-20 15:08:36 +0000
commite201023c0e13ee6f7f62da6c58dee872a92ce359 (patch)
tree7c4323af32f49b9fde5cce011c2bb4d24244838d /gcc/testsuite/gnat.dg
parent3a248f7cecb43333923d6b2f89a1acb4e6b3dd6e (diff)
downloadgcc-e201023c0e13ee6f7f62da6c58dee872a92ce359.tar.gz
exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a component of an array aggregate if...
gcc/ada/ 2017-10-20 Bob Duff <duff@adacore.com> * exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a component of an array aggregate if it is initialized by a build-in-place function call. * exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable bip for nonlimited types. * debug.adb: Document -gnatd.9. 2017-10-20 Bob Duff <duff@adacore.com> * sem_ch12.adb: Remove redundant setting of Parent. 2017-10-20 Eric Botcazou <ebotcazou@adacore.com> * sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one of the operands is a string literal. 2017-10-20 Bob Duff <duff@adacore.com> * einfo.ads: Comment fix. 2017-10-20 Clement Fumex <fumex@adacore.com> * switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC. 2017-10-20 Ed Schonberg <schonberg@adacore.com> * sem_dim.adb (Extract_Power): Accept dimension values that are not non-negative integers when the dimensioned base type is an Integer type. gcc/testsuite/ 2017-10-20 Ed Schonberg <schonberg@adacore.com> * gnat.dg/dimensions.adb, gnat.dg/dimensions.ads: New testcase. From-SVN: r253941
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/dimensions.adb5
-rw-r--r--gcc/testsuite/gnat.dg/dimensions.ads29
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/dimensions.adb b/gcc/testsuite/gnat.dg/dimensions.adb
new file mode 100644
index 00000000000..86fc6eef670
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/dimensions.adb
@@ -0,0 +1,5 @@
+-- { dg-do compile }
+
+package body Dimensions is
+ procedure Dummy is null;
+end Dimensions;
diff --git a/gcc/testsuite/gnat.dg/dimensions.ads b/gcc/testsuite/gnat.dg/dimensions.ads
new file mode 100644
index 00000000000..54bab081470
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/dimensions.ads
@@ -0,0 +1,29 @@
+package Dimensions is
+
+ type Mks_Int_Type is new Integer
+ with
+ Dimension_System => (
+ (Unit_Name => Meter, Unit_Symbol => 'm', Dim_Symbol => 'L'),
+ (Unit_Name => Kilogram, Unit_Symbol => "kg", Dim_Symbol => 'M'),
+ (Unit_Name => Second, Unit_Symbol => 's', Dim_Symbol => 'T'),
+ (Unit_Name => Ampere, Unit_Symbol => 'A', Dim_Symbol => 'I'),
+ (Unit_Name => Kelvin, Unit_Symbol => 'K', Dim_Symbol => '@'),
+ (Unit_Name => Mole, Unit_Symbol => "mol", Dim_Symbol => 'N'),
+ (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J'));
+
+ subtype Int_Length is Mks_Int_Type
+ with
+ Dimension => (Symbol => 'm',
+ Meter => 1,
+ others => 0);
+
+ subtype Int_Speed is Mks_Int_Type
+ with
+ Dimension => (
+ Meter => 1,
+ Second => -1,
+ others => 0);
+
+ procedure Dummy;
+
+end Dimensions;