+2017-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80163
+ * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
+ vs. ZERO_EXTEND based on signedness of treeop0's type rather than
+ signedness of the result type.
+
2017-04-12 Richard Biener <rguenther@suse.de>
- Jeff Law <law@redhat.com>
+ Jeff Law <law@redhat.com>
PR tree-optimization/80359
* tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
for quad_address_p for TImode, instead of just not indexed_address.
2017-04-12 Richard Biener <rguenther@suse.de>
- Bernd Edlinger <bernd.edlinger@hotmail.de>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/79671
* alias.c (component_uses_parent_alias_set_from): Handle
}
else if (modifier == EXPAND_INITIALIZER)
- op0 = gen_rtx_fmt_e (unsignedp ? ZERO_EXTEND : SIGN_EXTEND, mode, op0);
+ op0 = gen_rtx_fmt_e (TYPE_UNSIGNED (TREE_TYPE (treeop0))
+ ? ZERO_EXTEND : SIGN_EXTEND, mode, op0);
else if (target == 0)
op0 = convert_to_mode (mode, op0,
+2017-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/80163
+ * gcc.dg/torture/pr80163.c: New test.
+
2017-04-12 Richard Biener <rguenther@suse.de>
- Jeff Law <law@redhat.com>
+ Jeff Law <law@redhat.com>
PR tree-optimization/80359
* gcc.dg/torture/pr80359.c: New testcase.
2017-04-12 Richard Biener <rguenther@suse.de>
- Bernd Edlinger <bernd.edlinger@hotmail.de>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/79671
* g++.dg/torture/pr79671.C: New testcase.
--- /dev/null
+/* PR c/80163 */
+/* { dg-do compile { target int128 } } */
+
+volatile int v;
+
+__attribute__((noinline, noclone)) void
+bar (void)
+{
+ v++;
+ asm volatile ("" : : : "memory");
+}
+
+__attribute__((noinline, noclone)) __int128_t *
+foo (unsigned long **p)
+{
+a:
+ bar ();
+b:
+ bar ();
+ static __int128_t d = (unsigned long) &&a - (unsigned long) &&b;
+ static unsigned long e = (unsigned long) &&a - (unsigned long) &&b;
+ *p = &e;
+ return &d;
+}
+
+int
+main ()
+{
+ __int128_t *p;
+ unsigned long *q;
+ p = foo (&q);
+ if (*p != *q)
+ __builtin_abort ();
+ return 0;
+}