* builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2,
expand_builtin_mathfn_3): Avoid using arguments passed to
save_expr after that call.
* gcc.c-torture/execute/
20041213-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92151
138bc75d-0d04-0410-961f-
82ee72b054a4
2004-12-14 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/18951
+ * builtins.c (expand_builtin_mathfn, expand_builtin_mathfn_2,
+ expand_builtin_mathfn_3): Avoid using arguments passed to
+ save_expr after that call.
+
* fold-const.c (fold_single_bit_test): If flag_syntax_only, pretend
LOAD_EXTEND_OP is not defined.
(fold): Likewise. If flag_syntax_only, don't depend on BITS_PER_WORD.
narg = builtin_save_expr (arg);
if (narg != arg)
{
+ arg = narg;
arglist = build_tree_list (NULL_TREE, arg);
exp = build_function_call_expr (fndecl, arglist);
}
narg = builtin_save_expr (arg1);
if (narg != arg1)
{
+ arg1 = narg;
temp = build_tree_list (NULL_TREE, narg);
stable = false;
}
narg = builtin_save_expr (arg0);
if (narg != arg0)
{
+ arg0 = narg;
arglist = tree_cons (NULL_TREE, narg, temp);
stable = false;
}
narg = save_expr (arg);
if (narg != arg)
{
+ arg = narg;
arglist = build_tree_list (NULL_TREE, arg);
exp = build_function_call_expr (fndecl, arglist);
}
+2004-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/18951
+ * gcc.c-torture/execute/20041213-1.c: New test.
+
2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18949
--- /dev/null
+extern double sqrt (double);
+extern void abort (void);
+int once;
+
+double foo (void)
+{
+ if (once++)
+ abort ();
+ return 0.0 / 0.0;
+}
+
+double x;
+int main (void)
+{
+ x = sqrt (foo ());
+ return 0;
+}