From: Tom de Vries Date: Tue, 21 Apr 2015 08:43:07 +0000 (+0000) Subject: Mark ifn_va_arg with ECF_NOTHROW X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22fe969f2c42d8ac8e978e8454625f176b8fba76;p=gcc.git Mark ifn_va_arg with ECF_NOTHROW 2015-04-21 Tom de Vries PR tree-optimization/65802 * internal-fn.def (VA_ARG): Add ECF_NOTROW to flags. * g++.dg/pr65802.C: New test. From-SVN: r222259 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 66856a875c4..64e9aae187b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-04-21 Tom de Vries + + PR tree-optimization/65802 + * internal-fn.def (VA_ARG): Add ECF_NOTROW to flags. + 2015-04-21 Kyrylo Tkachov * common/config/aarch64/aarch64-common.c (AARCH64_CPU_NAME_LENGTH): diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def index f557c64247c..7e193131a7f 100644 --- a/gcc/internal-fn.def +++ b/gcc/internal-fn.def @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index db9559152cb..4ca31e0f2ad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-04-21 Tom de Vries + + PR tree-optimization/65802 + * g++.dg/pr65802.C: New test. + 2015-04-21 Bin Cheng PR testsuite/65767 diff --git a/gcc/testsuite/g++.dg/pr65802.C b/gcc/testsuite/g++.dg/pr65802.C new file mode 100644 index 00000000000..26e5317aeb1 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr65802.C @@ -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 (...) + { + + } +}