From d60a18dfbc33b33ab07146641b72fbd33c25d69c Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 2 May 2007 07:43:14 +0000 Subject: [PATCH] Test that TREE_CONSTANT is being set correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36645 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FrontendAda/unc_constructor.adb | 9 +++++++++ test/FrontendAda/unc_constructor.ads | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 test/FrontendAda/unc_constructor.adb create mode 100644 test/FrontendAda/unc_constructor.ads diff --git a/test/FrontendAda/unc_constructor.adb b/test/FrontendAda/unc_constructor.adb new file mode 100644 index 00000000000..e32c04a2e01 --- /dev/null +++ b/test/FrontendAda/unc_constructor.adb @@ -0,0 +1,9 @@ +-- RUN: %llvmgcc -c %s -o /dev/null +package body Unc_Constructor is + procedure P (X : A) is + begin + if X = A0 then + null; + end if; + end; +end; diff --git a/test/FrontendAda/unc_constructor.ads b/test/FrontendAda/unc_constructor.ads new file mode 100644 index 00000000000..d6f8db50d89 --- /dev/null +++ b/test/FrontendAda/unc_constructor.ads @@ -0,0 +1,8 @@ +package Unc_Constructor is + type C is null record; + type A is array (Positive range <>) of C; + A0 : constant A; + procedure P (X : A); +private + A0 : aliased constant A := (1 .. 0 => (null record)); +end;