On Fri, Jan 24, 2020 at 03:52:51PM -0700, Jeff Law wrote:
> When we thread through the successor of a joiner block we make a clone
> of the joiner block and redirect its outgoing edges.  Of course if
> there's cases where we can't redirect an edge, then bad things will
> happen.
> 
> The code already checked for EDGE_ABNORMAL to suppress threading in
> that case.  But it really should have been checking EDGE_COMPLEX which
> includes ABNORMAL_CALL, EH and PRESERVE.
> 
> This patch fixes that oversight and resolves the BZ.  Bootstrapped and
> regression tested on x86_64.  Committed to the trunk.

The test FAILs on i686-linux, operator new's first parameter needs to be
size_t, which for ia32 is not unsigned long, but unsigned int.

Also, I think we shouldn't be adding tests to g++.dg/ directly, for
optimization test it might be better in g++.dg/opt/, but as it is x86
guarded, I've moved it to g++.dg/target/i386/ instead.

Tested on x86_64-linux -m32/-m64, committed to trunk as obvious.

2020-01-26  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/92788
        * g++.dg/pr92788.C: Move to ...
        * g++.target/i386/pr92788.C: ... here.  Remove target from dg-do line.
        Change type of operator new's first parameter to __SIZE_TYPE__.

diff --git a/gcc/testsuite/g++.dg/pr92788.C 
b/gcc/testsuite/g++.target/i386/pr92788.C
similarity index 98%
rename from gcc/testsuite/g++.dg/pr92788.C
rename to gcc/testsuite/g++.target/i386/pr92788.C
index b92ae38f7aa..048bbd1b9b8 100644
--- a/gcc/testsuite/g++.dg/pr92788.C
+++ b/gcc/testsuite/g++.target/i386/pr92788.C
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-do compile } */
 /* { dg-require-effective-target c++11 } */
 /* { dg-options "-O3 -fnon-call-exceptions -ftracer -march=k8 
-Wno-return-type" } */
 
@@ -17,7 +17,7 @@ struct is_same : integral_constant<true> {};
 
 template <bool, typename _Tp> using __enable_if_t = _Tp;
 
-void *operator new(unsigned long, void *__p) { return __p; }
+void *operator new(__SIZE_TYPE__, void *__p) { return __p; }
 
 template <typename _Iterator, typename> class __normal_iterator {
 


        Jakub

Reply via email to