PR optimization/11557
* calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK
unless we know which function is being called.
PR optimization/11557
* gcc.dg/
20030717-1.c: New test.
From-SVN: r69538
+2003-07-17 Mark Mitchell <mark@codesourcery.com>
+
+ PR optimization/11557
+ * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK
+ unless we know which function is being called.
+
2003-07-17 Roger Sayle <roger@eyesopen.com>
* cse.c (fold_rtx): Use swap_commutative_operands_p to determine
if (TREE_NOTHROW (exp))
flags |= ECF_NOTHROW;
+
+ if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
+ flags |= ECF_LIBCALL_BLOCK;
}
if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
- flags |= ECF_CONST | ECF_LIBCALL_BLOCK;
+ flags |= ECF_CONST;
if (TREE_THIS_VOLATILE (exp))
flags |= ECF_NORETURN;
+2003-07-17 Mark Mitchell <mark@codesourcery.com>
+
+ PR optimization/11557
+ * gcc.dg/20030717-1.c: New test.
+
2003-07-17 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/10476
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+int zero (void)
+{
+ return 0;
+}
+
+int one (void)
+{
+ return 1;
+}
+
+int main (void)
+{
+ int i = 1;
+ int r = (i ? one : zero)();
+ if (r != 1)
+ abort();
+ return 0;
+}
+