Hi Jakub,

>> The following testcase is miscompiled on x86_64-linux (-m32 and -m64) at
>> -O1, as a pointer has two vars in points-to set, the first one is escaped
>> heap var and the second one is escaped non-heap var, and in the end the last
>> var that sets vars_contains_escaped won and overwrote
>> vars_contains_escaped_heap rather than oring into it.
>>
>> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
>> preapproved by Richard on IRC, committed to trunk.
>> Will test 8.x backport tonight and commit to 8.3 if that succeeds.
>>
>> 2019-02-13  Jakub Jelinek  <ja...@redhat.com>
>>
>>      PR middle-end/89303
>>      * tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
>>      into pt->vars_contains_escaped_heap instead of setting
>>      pt->vars_contains_escaped_heap to it.
>>
>> 2019-02-13  Jonathan Wakely  <jwak...@redhat.com>
>>          Jakub Jelinek  <ja...@redhat.com>
>>
>>      PR middle-end/89303
>>      * g++.dg/torture/pr89303.C: New test.
>
> the new testcase FAILs on Solaris:
>
> +FAIL: g++.dg/torture/pr89303.C   -O0  (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C   -O1  (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C   -O2  (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C   -O2 -flto  (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C -O2 -flto -flto-partition=none (test for
> excess errors)
> +FAIL: g++.dg/torture/pr89303.C -O3 -fomit-frame-pointer -funroll-loops
> -fpeel-loops -ftracer -finline-functions (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C   -O3 -g  (test for excess errors)
> +FAIL: g++.dg/torture/pr89303.C   -Os  (test for excess errors)
>
> Excess errors:
> ld: warning: symbol 'typeinfo for std::bad_weak_ptr' has differing sizes:
>         (file /var/tmp//ccB1o8Ya.o value=0x8; file
> /var/gcc/regression/trunk/11-gcc/build/i386-pc-solaris2.11/./libstdc++-v3/src/.libs/libstdc++.so
> value=0xc);
>         /var/tmp//ccB1o8Ya.o definition taken
>
> I suspect the class can just be renamed in pr89303.C to avoid the
> conflict with include/bits/shared_ptr_base.h?

the following patch does this.  I've verified that it still FAILs on
x86_64-pc-linux-gnu before your patch and PASSes afterwards, as well as
avoiding the linker warning on i386-pc-solaris2.11.

Ok for mainline?

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2019-02-15  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * g++.dg/torture/pr89303.C (bad_weak_ptr): Rename to
        bad_weak_ptr_.

# HG changeset patch
# Parent  056fe4093ce40dc462c6b50c3ae49df032a92230
Fix g++.dg/torture/pr89303.C with Solaris ld

diff --git a/gcc/testsuite/g++.dg/torture/pr89303.C b/gcc/testsuite/g++.dg/torture/pr89303.C
--- a/gcc/testsuite/g++.dg/torture/pr89303.C
+++ b/gcc/testsuite/g++.dg/torture/pr89303.C
@@ -350,11 +350,11 @@ namespace std
       { return static_cast<const _Tp*>(_M_addr()); }
     };
 
-  class bad_weak_ptr { };
+  class bad_weak_ptr_ { };
 
   inline void
   __throw_bad_weak_ptr()
-  { (throw (bad_weak_ptr())); }
+  { (throw (bad_weak_ptr_())); }
 
     class _Sp_counted_base
     {

Reply via email to