From 49f69381690221f19605e6a6ada0741285e9c244 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 5 Mar 2007 08:34:35 +0000 Subject: [PATCH] Testcase causing the Ada front-end to create bogus constructor fields. llvm-svn: 34926 --- llvm/test/AdaFrontend/fat_fields.adb | 10 ++++++++++ llvm/test/AdaFrontend/fat_fields.ads | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 llvm/test/AdaFrontend/fat_fields.adb create mode 100644 llvm/test/AdaFrontend/fat_fields.ads diff --git a/llvm/test/AdaFrontend/fat_fields.adb b/llvm/test/AdaFrontend/fat_fields.adb new file mode 100644 index 000000000000..906e34ee0bef --- /dev/null +++ b/llvm/test/AdaFrontend/fat_fields.adb @@ -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/llvm/test/AdaFrontend/fat_fields.ads b/llvm/test/AdaFrontend/fat_fields.ads new file mode 100644 index 000000000000..d3eab3e28668 --- /dev/null +++ b/llvm/test/AdaFrontend/fat_fields.ads @@ -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;