re PR c++/79410 (internal compiler error: in gimplify_init_ctor_preeval, at gimplify...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 1 Mar 2018 17:01:54 +0000 (17:01 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 1 Mar 2018 17:01:54 +0000 (17:01 +0000)
2018-03-01  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/79410
* g++.dg/torture/pr79410.C: New.

From-SVN: r258106

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr79410.C [new file with mode: 0644]

index d1acff64fb9839352b5ca288e2ae1dbbcc58b051..7a45412179deafed67868009551b10d420ea3909 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-01  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/79410
+       * g++.dg/torture/pr79410.C: New.
+
 2018-03-01  Martin Liska  <mliska@suse.cz>
 
        PR sanitizer/82484
diff --git a/gcc/testsuite/g++.dg/torture/pr79410.C b/gcc/testsuite/g++.dg/torture/pr79410.C
new file mode 100644 (file)
index 0000000..d5df56b
--- /dev/null
@@ -0,0 +1,10 @@
+struct duration {
+  long val;
+  static constexpr duration max() { return {}; }
+};
+struct S {
+  duration max = duration::max();
+};
+void Ice(S& s) {
+  s = {};
+}