aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/g++.dg/lto/20100603-1_0.C14
-rw-r--r--gcc/testsuite/g++.dg/lto/20100603-1_1.c2
3 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 048c513..79d34c2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-03 Richard Guenther <rguenther@suse.de>
+
+ PR lto/41921
+ * lib/lto.exp: Always load gcc.exp.
+ (lto-obj): For C source files invoke gcc_target_compile.
+ * g++.dg/lto/20100603-1_0.C: New testcase.
+ * g++.dg/lto/20100603-1_1.c: Likewise.
+
2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
PR tree-optimization/43688
diff --git a/gcc/testsuite/g++.dg/lto/20100603-1_0.C b/gcc/testsuite/g++.dg/lto/20100603-1_0.C
new file mode 100644
index 0000000..8fe11a2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/20100603-1_0.C
@@ -0,0 +1,14 @@
+/* { dg-lto-do link } */
+
+extern "C" {
+ typedef struct {} CvImage;
+ extern CvImage* Cv_ImageNew(void);
+}
+void __attribute__((noinline,noclone))
+_Raytrace(CvImage* LImage) { __asm volatile (""); }
+int main(int LArgC, char** LArgV)
+{
+ CvImage* LImage = Cv_ImageNew();
+ _Raytrace(LImage);
+}
+
diff --git a/gcc/testsuite/g++.dg/lto/20100603-1_1.c b/gcc/testsuite/g++.dg/lto/20100603-1_1.c
new file mode 100644
index 0000000..fddce5d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/20100603-1_1.c
@@ -0,0 +1,2 @@
+typedef struct {} CvImage;
+CvImage* Cv_ImageNew(void) { }