-2015-10-26 Simon Dardis <simon.dardis@imgtec.com>
+2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * match.pd (fold_widened_comparison): Apply simplifications to all
+ integral types.
+
+2015-10-26 Simon Dardis <simon.dardis@imgtec.com>
* target.def (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): New hook.
* doc/tm.texi.in (TARGET_NO_SPECULATION_IN_DELAY_SLOTS_P): Document.
2015-10-26 Jeff Law <law@redhat.com>
PR tree-optimization/68013
- * tree-ssa-threadbackward.c
- (fsm_find_control_statement_thread_paths): Make sure the first block
- in the path is in VISITED_BBs.
+ * tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
+ Make sure the first block in the path is in VISITED_BBs.
2015-10-26 Richard Biener <rguenther@suse.de>
Dominik Vogt <vogt@linux.vnet.ibm.com>
&& (TYPE_UNSIGNED (TREE_TYPE (@00))
== TYPE_UNSIGNED (TREE_TYPE (@10))))
|| (TREE_CODE (@10) == INTEGER_CST
- && (TREE_CODE (TREE_TYPE (@00)) == INTEGER_TYPE
- || TREE_CODE (TREE_TYPE (@00)) == BOOLEAN_TYPE)
+ && INTEGRAL_TYPE_P (TREE_TYPE (@00))
&& int_fits_type_p (@10, TREE_TYPE (@00)))))
(cmp @00 (convert @10))
(if (TREE_CODE (@10) == INTEGER_CST
- && TREE_CODE (TREE_TYPE (@00)) == INTEGER_TYPE
+ && INTEGRAL_TYPE_P (TREE_TYPE (@00))
&& !int_fits_type_p (@10, TREE_TYPE (@00)))
(with
{
+2015-10-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/atomic-noinline.c: Change test on __atomic_is_lock_free.
+ * gcc.dg/atomic-noinline-aux.c: Adjust accordingly.
+ * gnat.dg/opt51.adb: New test.
+ * gnat.dg/opt51_pkg.ads: New helper.
+
2015-10-26 Simon Dardis <simon.dardis@imgtec.com>
* gcc.target/mips/ds-schedule-1.c: New.
return ret;
}
-int __atomic_is_lock_free (int i, void *p)
+bool __atomic_is_lock_free (int i, void *p)
{
- return 10;
+ *(short *)p = 1;
+ return true;
}
#include <stdlib.h>
#include <stdbool.h>
-extern void abort();
+extern void abort (void);
-short as,bs,cs;
+short as,bs,cs,ds;
char ac,bc,cc;
int
-main ()
+main (void)
{
ac = __atomic_exchange_n (&bc, cc, __ATOMIC_RELAXED);
/* This should be translated to __atomic_fetch_add for the library */
as = __atomic_add_fetch (&cs, 10, __ATOMIC_RELAXED);
-
if (cs != 1)
abort ();
- /* The fake external function should return 10. */
- if (__atomic_is_lock_free (4, 0) != 10)
- abort ();
-
/* PR 51040 was caused by arithmetic code not patching up nand_fetch properly
when used an an external function. Look for proper return value here. */
ac = 0x3C;
if (bc != ac)
abort ();
+ if (!__atomic_is_lock_free (2, &ds))
+ abort ();
+ if (ds != 1)
+ abort ();
+
return 0;
}
-
-
-
--- /dev/null
+-- { dg-do compile }
+-- { dg-options "-O2 -fdump-tree-optimized" }
+
+with Opt51_Pkg; use Opt51_Pkg;
+
+procedure Opt51 (E: Enum; F : out Float) is
+begin
+ case (E) is
+ when One =>
+ F := 1.0;
+ when Two =>
+ F := 2.0;
+ when Three =>
+ F := 3.0;
+ when others =>
+ raise Program_Error;
+ end case;
+end;
+
+-- { dg-final { scan-tree-dump-not "check_PE_Explicit_Raise" "optimized" } }
--- /dev/null
+package Opt51_Pkg is
+
+ type Enum is (One, Two, Three);
+
+end Opt51_Pkg;