summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr28116.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/pr28116.C')
-rw-r--r--gcc/testsuite/g++.dg/opt/pr28116.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/pr28116.C b/gcc/testsuite/g++.dg/opt/pr28116.C
new file mode 100644
index 000000000..a85917c8f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr28116.C
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+struct QDateTime
+{
+ QDateTime addSecs( int secs ) const;
+ int t;
+};
+QDateTime gridToDate(long x)
+{
+ QDateTime date;
+ date = date.addSecs(1);
+ return date;
+}
+void whatsOnAt(long x, long y)
+{
+ gridToDate(x);
+}
+