Testcase causing the Ada front-end to create bogus constructor fields.
authorDuncan Sands <baldrick@free.fr>
Mon, 5 Mar 2007 08:34:35 +0000 (08:34 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 5 Mar 2007 08:34:35 +0000 (08:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34926 91177308-0d34-0410-b5e6-96231b3b80d8

test/AdaFrontend/fat_fields.adb [new file with mode: 0644]
test/AdaFrontend/fat_fields.ads [new file with mode: 0644]

diff --git a/test/AdaFrontend/fat_fields.adb b/test/AdaFrontend/fat_fields.adb
new file mode 100644 (file)
index 0000000..906e34e
--- /dev/null
@@ -0,0 +1,10 @@
+-- RUN: %llvmgcc -c %s -o /dev/null
+-- RUN: %llvmgcc -c %s -O2 -o /dev/null
+package body Fat_Fields is
+   procedure Proc is
+   begin
+      if P = null then
+         null;
+      end if;
+   end;
+end;
diff --git a/test/AdaFrontend/fat_fields.ads b/test/AdaFrontend/fat_fields.ads
new file mode 100644 (file)
index 0000000..d3eab3e
--- /dev/null
@@ -0,0 +1,6 @@
+package Fat_Fields is
+   pragma Elaborate_Body;
+   type A is array (Positive range <>) of Boolean;
+   type A_Ptr is access A;
+   P : A_Ptr := null;
+end;