On 1/2/2013 12:14 PM, David Blaikie wrote:

LGTM - though we usually test with clang -cc1 where possible, so I'd
ask that you change the RUN line of your test to:

// RUN: %clang_cc1 -emit-llvm -triple hexagon-unknown-unknown %s -S -o /dev/null

& adding back in the -o /dev/null so we don't create unnecessary
temporary files. As far as I understand it, the test running
infrastructure (lit) has the necessary smarts to translate the use of
/dev/null to something appropriate on each platform. If you look
around at the regression test suite you'll find many other tests using
/dev/null for output.

Done.

I had to change the "-target" option to "-triple", as cc1 did not understand the former.

-Krzysztof


--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
>From 456bacc7409f2a08583abd9f6dda65cd79ed4b94 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <[email protected]>
Date: Sat, 29 Dec 2012 13:52:39 -0600
Subject: [PATCH] Bug 14744: ICE when compiling any program for Hexagon

---
 lib/Basic/Targets.cpp                |    2 +-
 test/Frontend/hexagon-target-basic.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
 create mode 100644 test/Frontend/hexagon-target-basic.c

diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index aadca20..aaf5a8a 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3500,7 +3500,7 @@ public:
   HexagonTargetInfo(const std::string& triple) : TargetInfo(triple)  {
     BigEndian = false;
     DescriptionString = ("e-p:32:32:32-"
-                         "i64:64:64-i32:32:32-i16:16:16-i1:32:32"
+                         "i64:64:64-i32:32:32-i16:16:16-i1:32:32-"
                          "f64:64:64-f32:32:32-a0:0-n32");
 
     // {} in inline assembly are packet specifiers, not assembly variant
diff --git a/test/Frontend/hexagon-target-basic.c 
b/test/Frontend/hexagon-target-basic.c
new file mode 100644
index 0000000..2c0e82b
--- /dev/null
+++ b/test/Frontend/hexagon-target-basic.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm -triple hexagon-unknown-unknown %s -S -o 
/dev/null
+
+// Testcase for bug 14744.  Empty file is sufficient, since the problem
+// was a bad data layout string in the Hexagon target causing an ICE
+// when compiling any Hexagon program.
+
+int x;  // In C99, a translation unit needs to have at least one declaration.
+
-- 
1.7.6.4

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to