summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr30762-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr30762-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr30762-1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr30762-1.c b/gcc/testsuite/gcc.dg/pr30762-1.c
new file mode 100644
index 000000000..75fb762d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr30762-1.c
@@ -0,0 +1,18 @@
+/* PR c/30762 */
+/* { dg-do link } */
+/* { dg-require-effective-target lto } */
+/* { dg-options "-flto -O3" } */
+/* { dg-additional-sources pr30762-2.c } */
+
+typedef struct { int i; } D;
+extern void foo (D);
+
+void
+bar (void)
+{
+ D d;
+ d.i = 1;
+ foo (d);
+}
+
+int main() { return 0; }