Mark ifn_va_arg with ECF_NOTHROW
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 2015 08:43:07 +0000 (08:43 +0000)
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Apr 2015 08:43:07 +0000 (08:43 +0000)
2015-04-21  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/65802
* internal-fn.def (VA_ARG): Add ECF_NOTROW to flags.

* g++.dg/pr65802.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222259 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/internal-fn.def
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr65802.C [new file with mode: 0644]

index 66856a8..64e9aae 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-21  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/65802
+       * internal-fn.def (VA_ARG): Add ECF_NOTROW to flags.
+
 2015-04-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * common/config/aarch64/aarch64-common.c (AARCH64_CPU_NAME_LENGTH):
index f557c64..7e19313 100644 (file)
@@ -62,4 +62,4 @@ DEF_INTERNAL_FN (ADD_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
 DEF_INTERNAL_FN (SUB_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
 DEF_INTERNAL_FN (MUL_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
 DEF_INTERNAL_FN (TSAN_FUNC_EXIT, ECF_NOVOPS | ECF_LEAF | ECF_NOTHROW, NULL)
-DEF_INTERNAL_FN (VA_ARG, 0, NULL)
+DEF_INTERNAL_FN (VA_ARG, ECF_NOTHROW, NULL)
index db95591..4ca31e0 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-21  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/65802
+       * g++.dg/pr65802.C: New test.
+
 2015-04-21  Bin Cheng  <bin.cheng@arm.com>
 
        PR testsuite/65767
diff --git a/gcc/testsuite/g++.dg/pr65802.C b/gcc/testsuite/g++.dg/pr65802.C
new file mode 100644 (file)
index 0000000..26e5317
--- /dev/null
@@ -0,0 +1,29 @@
+// { dg-do compile }
+// { dg-options "-O0" }
+
+typedef int tf ();
+
+struct S
+{
+  tf m_fn1;
+} a;
+
+void
+fn1 ()
+{
+  try
+    {
+      __builtin_va_list c;
+      {
+       int *d = __builtin_va_arg (c, int *);
+       int **e = &d;
+       __asm__("" : "=d"(e));
+       a.m_fn1 ();
+      }
+      a.m_fn1 ();
+    }
+  catch (...)
+    {
+
+    }
+}