public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
@ 2021-05-01 12:47 iains at gcc dot gnu.org
  2021-05-01 12:49 ` [Bug bootstrap/100373] " iains at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-01 12:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

            Bug ID: 100373
           Summary: [12 Regression] Darwin, Compare-debug fail after
                    r12-248-gb58dc0b803057
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50725
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50725&action=edit
tarball with asm, objects and obj dumps.

Exactly which cases fail seems to depend on the CPU in use and the OS version. 
For modern CPUs (xeon w, core i5 Skylake) the fail seems to be quite reliably
in mpfr (which I build in tree).  For older corei7 machines on Darwin16, I've
seen also gcc/gcc.o as mismatched.

I did a run with -save-temps -dp (asm attached).
this is on x86_64-darwin20, but the problem is seen on x86_64-darwin* AFAICT. 
Backing out r12-248-gb58dc0b803057 allows bootstrap to succeed.

attached:

stage2-mpfr/src/gmp_op.o.stripped
stage2-mpfr/src/gmp_op.o
stage2-mpfr/src/gmp_op.s
s2.txt == objdump -d -r stage2-mpfr/src/gmp_op.o.stripped >s2.txt
stage3-mpfr/src/gmp_op.o.stripped
stage3-mpfr/src/gmp_op.o
stage3-mpfr/src/gmp_op.s
s3.txt == objdump -d -r stage3-mpfr/src/gmp_op.o.stripped >s3.txt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
@ 2021-05-01 12:49 ` iains at gcc dot gnu.org
  2021-05-02 15:09 ` iains at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-01 12:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
             Target|                            |x86_64-darwin
   Last reconfirmed|                            |2021-05-01
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
  2021-05-01 12:49 ` [Bug bootstrap/100373] " iains at gcc dot gnu.org
@ 2021-05-02 15:09 ` iains at gcc dot gnu.org
  2021-05-03  8:00 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-02 15:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
this happens with mpfr-4.x sources and not with mpfr-3.1.6.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
  2021-05-01 12:49 ` [Bug bootstrap/100373] " iains at gcc dot gnu.org
  2021-05-02 15:09 ` iains at gcc dot gnu.org
@ 2021-05-03  8:00 ` rguenth at gcc dot gnu.org
  2021-05-04 10:44 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-03  8:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |UNCONFIRMED
     Ever confirmed|1                           |0
                 CC|                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |12.0
            Version|unknown                     |12.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-05-03  8:00 ` rguenth at gcc dot gnu.org
@ 2021-05-04 10:44 ` rguenth at gcc dot gnu.org
  2021-05-04 10:52 ` iains at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 10:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-05-04 10:44 ` rguenth at gcc dot gnu.org
@ 2021-05-04 10:52 ` iains at gcc dot gnu.org
  2021-05-04 10:55 ` iains at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-04 10:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0

it might well be some corner-case, but Darwin is PIC by default, so it might be
worth trying --with-pic ?

failing that, I'll have to figure out some way to debug it...

(the CPU was not, in the end relevant, it was more that on the older machines I
hadn't updated GMP & friends to newer versions.)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-05-04 10:52 ` iains at gcc dot gnu.org
@ 2021-05-04 10:55 ` iains at gcc dot gnu.org
  2021-05-04 11:03 ` rguenther at suse dot de
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-04 10:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Iain Sandoe from comment #3)
> (In reply to Richard Biener from comment #2)
> > Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0
> 
> it might well be some corner-case, but Darwin is PIC by default, so it might
> be worth trying --with-pic ?

and -gstrict-dwarf, -gdwarf-2

(I do plan to bump the default to DWARF-4 for macOS 10.10+ during GCC12 but
it's tricky on the older systems without configury tests for suitable dsymutil
- those are written and mostly tested, but still in my Q)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-05-04 10:55 ` iains at gcc dot gnu.org
@ 2021-05-04 11:03 ` rguenther at suse dot de
  2021-05-04 23:45 ` iains at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenther at suse dot de @ 2021-05-04 11:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 4 May 2021, iains at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373
> 
> --- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
> (In reply to Iain Sandoe from comment #3)
> > (In reply to Richard Biener from comment #2)
> > > Doesn't reproduce on x86_64-linux with bootstrapping with in-tree mpfr 4.1.0
> > 
> > it might well be some corner-case, but Darwin is PIC by default, so it might
> > be worth trying --with-pic ?
> 
> and -gstrict-dwarf, -gdwarf-2

That shouldn't really matter.  If you have preprocessed source of
a miscomparing object and you can reproduce with that and
-fcompare-debug + options that would be a good first step.
Then creduce the result and look where it differs in code generation.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-05-04 11:03 ` rguenther at suse dot de
@ 2021-05-04 23:45 ` iains at gcc dot gnu.org
  2021-05-04 23:48 ` iains at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-04 23:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
master @r12-438 doesn't fail compare debug (maybe some later change masks this)
 I think this will reproduce on a stage 1..

reduced:

a;
_Thread_local b;
c() {
  long d = b;
  a = 0;
  b = 0;
}

cc1 -fpreprocessed gmp_op.i -O2 -gtoggle -quiet -o a.s
cc1 -fpreprocessed gmp_op.i -O2 -quiet -o b.s
...

a.o.stripped:
(__TEXT,__text) section
_c:
0000000000000000        subq    $0x8, %rsp
0000000000000004        leaq    (%rip), %rdi
000000000000000b        callq   0x10
0000000000000010        movl    $0x0, -0x4(%rip)
000000000000001a        movl    $0x0, (%rax)
0000000000000020        addq    $0x8, %rsp
0000000000000024        retq


b.o.stripped:
(__TEXT,__text) section
_c:
0000000000000000        subq    $0x8, %rsp
0000000000000004        leaq    (%rip), %rdi
000000000000000b        movl    $0x0, -0x4(%rip)
0000000000000015        callq   0x1a
000000000000001a        movl    $0x0, (%rax)
0000000000000020        addq    $0x8, %rsp
0000000000000024        retq

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-05-04 23:45 ` iains at gcc dot gnu.org
@ 2021-05-04 23:48 ` iains at gcc dot gnu.org
  2021-05-05  8:08 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-04 23:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> ---
of course, this could be exposing some prexisting problem (but i did check that
the previous revision did not show the problem).  -fno-ipa-ra makes no
difference.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-05-04 23:48 ` iains at gcc dot gnu.org
@ 2021-05-05  8:08 ` rguenth at gcc dot gnu.org
  2021-05-05  8:48 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05  8:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2021-05-01 00:00:00         |2021-05-05
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
The difference appears in the IPA emultls pass:

--- a/t.i.072i.emutls   2021-05-05 10:07:19.344748567 +0200
+++ b/t.i.072i.emutls   2021-05-05 10:07:09.104642849 +0200
@@ -5,8 +5,13 @@
   int * _4;

   <bb 2> [local count: 1073741824]:
-  a = 0;
+  # DEBUG BEGIN_STMT
   _4 = __builtin___emutls_get_address (&__emutls_v.b);
+  # DEBUG D#1 => *_4
+  # DEBUG d => (long int) D#1
+  # DEBUG BEGIN_STMT
+  a = 0;
+  # DEBUG BEGIN_STMT
   *_4 = 0;
   return;

I will have a closer look.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-05-05  8:08 ` rguenth at gcc dot gnu.org
@ 2021-05-05  8:48 ` rguenth at gcc dot gnu.org
  2021-05-05 10:20 ` iains at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05  8:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 50756
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50756&action=edit
patch

This patch survives the new testcase with a cc1 cross to darwin and it does
produce expected results when I mangle it in different ways to hopefully catch
all paths in the code.

Actual bootstrap & regtest on a emutls target appreciated.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2021-05-05  8:48 ` rguenth at gcc dot gnu.org
@ 2021-05-05 10:20 ` iains at gcc dot gnu.org
  2021-05-05 11:58 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-05 10:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
    frame #0: 0x00000001016a4bb3 cc1`::gimple_code(g=0x0000000000000000) at
gimple.h:1782
   1779 static inline enum gimple_code
   1780 gimple_code (const gimple *g)
   1781 {
-> 1782   return g->code;
   1783 }
   1784 
   1785 
Target 0: (cc1) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x0)
  * frame #0: 0x00000001016a4bb3 cc1`::gimple_code(g=0x0000000000000000) at
gimple.h:1782
    frame #1: 0x00000001016a4f4f cc1`::is_gimple_debug(gs=0x0000000000000000)
at gimple.h:4773
    frame #2: 0x00000001016a7111 cc1`::lower_emutls_1(ptr=0x00000001030d4358,
walk_subtrees=0x00007ffeefbff2d4, cb_data=0x00007ffeefbff370) at
tree-emutls.c:483
    frame #3: 0x0000000101a76f53 cc1`walk_tree_1(tp=0x00000001030d4358,
func=(cc1`::lower_emutls_1(tree *, int *, void *) at tree-emutls.c:457),
data=0x00007ffeefbff370, pset=0x0000000000000000,
lh=0x0000000000000000)(tree_node**, int*, void*), void*, hash_set<tree_node*,
false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false,
default_hash_traits<tree_node*> >*)) at tree.c:10959
    frame #4: 0x00000001016a75e3
cc1`::lower_emutls_phi_arg(phi=0x00000001030d4300, i=0, d=0x00007ffeefbff420)
at tree-emutls.c:601
    frame #5: 0x00000001016a77e3
cc1`::lower_emutls_function_body(node=0x0000000103045770) at tree-emutls.c:668
    frame #6: 0x00000001016a7ef4 cc1`::ipa_lower_emutls() at tree-emutls.c:806
    frame #7: 0x00000001016a7fe7
cc1`pass_ipa_lower_emutls::execute(this=0x000000014530fa00,
(null)=0x0000000000000000) const at tree-emutls.c:846
    frame #8: 0x00000001014192cd cc1`execute_one_pass(pass=0x000000014530fa00)
at passes.c:2567
    frame #9: 0x000000010141a39b
cc1`execute_ipa_pass_list(pass=0x000000014530fa00) at passes.c:2996
    frame #10: 0x0000000100cbb711 cc1`::ipa_passes() at cgraphunit.c:2154

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2021-05-05 10:20 ` iains at gcc dot gnu.org
@ 2021-05-05 11:58 ` rguenth at gcc dot gnu.org
  2021-05-05 23:44 ` iains at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-05 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50756|0                           |1
        is obsolete|                            |

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 50759
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50759&action=edit
updated patch

Fixed missing setting of wi.stmt in lower_emutls_phi_arg

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2021-05-05 11:58 ` rguenth at gcc dot gnu.org
@ 2021-05-05 23:44 ` iains at gcc dot gnu.org
  2021-05-06  8:08 ` cvs-commit at gcc dot gnu.org
  2021-05-06  8:09 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-05 23:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #11)
> Created attachment 50759 [details]
> updated patch
> 
> Fixed missing setting of wi.stmt in lower_emutls_phi_arg

I regstrapped r12-248+ first patch (I added the wi-stmt by hand) c.f. r12-247
and (a) bootstrap succeeded for patched (b) the testsuite showed nothing
unexpected.  This was on x86_64-darwin19, but I have no reason to expect any
significance to that version (or even arch).

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2021-05-05 23:44 ` iains at gcc dot gnu.org
@ 2021-05-06  8:08 ` cvs-commit at gcc dot gnu.org
  2021-05-06  8:09 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-06  8:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:b5254d6b75fe6be669396cd1261f1cba829cc451

commit r12-558-gb5254d6b75fe6be669396cd1261f1cba829cc451
Author: Richard Biener <rguenther@suse.de>
Date:   Wed May 5 10:15:27 2021 +0200

    ipa/100373 - fix emutls lowering compare-debug issue

    emutls figured that tls uses in debug-insns need lowering but
    that obviously has effects on code-generation as can be seen
    in the following IL diff with the new testcase:

       <bb 2> [local count: 1073741824]:
    -  a = 0;
    +  # DEBUG BEGIN_STMT
       _4 = __builtin___emutls_get_address (&__emutls_v.b);
    +  # DEBUG D#1 => *_4
    +  # DEBUG d => (long int) D#1
    +  # DEBUG BEGIN_STMT
    +  a = 0;
    +  # DEBUG BEGIN_STMT
       *_4 = 0;
       return;

    where it figured the debug use of b in the original

      <bb 2> [local count: 1073741824]:
      # DEBUG BEGIN_STMT
      # DEBUG D#1 => b
      # DEBUG d => (long int) D#1
      # DEBUG BEGIN_STMT
      a = 0;

    needs lowering (it maybe does when we want to produce perfect
    debug but that's just bad luck).

    The following patch fixes this by avoiding to create a new
    emutls address when visiting debug stmts and instead resets them.
    Another option might be to simply not lower debug stmt uses
    but I have no way to verify actual debug info for this.

    2021-05-05  Richard Biener  <rguenther@suse.de>

            PR ipa/100373
            * tree-emutls.c (gen_emutls_addr): Pass in whether we're
            dealing with a debug use and only query existing addresses
            if so.
            (lower_emutls_1): Avoid splitting out addresses for debug
            stmts, reset the debug stmt when we fail to find existing
            lowered addresses.
            (lower_emutls_phi_arg): Set wi.stmt.

            * gcc.dg/pr100373.c: New testcase.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/100373] [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057
  2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2021-05-06  8:08 ` cvs-commit at gcc dot gnu.org
@ 2021-05-06  8:09 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-06  8:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100373

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.  Latent on branches of course, but lets wait for fallout at least.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-05-06  8:09 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01 12:47 [Bug bootstrap/100373] New: [12 Regression] Darwin, Compare-debug fail after r12-248-gb58dc0b803057 iains at gcc dot gnu.org
2021-05-01 12:49 ` [Bug bootstrap/100373] " iains at gcc dot gnu.org
2021-05-02 15:09 ` iains at gcc dot gnu.org
2021-05-03  8:00 ` rguenth at gcc dot gnu.org
2021-05-04 10:44 ` rguenth at gcc dot gnu.org
2021-05-04 10:52 ` iains at gcc dot gnu.org
2021-05-04 10:55 ` iains at gcc dot gnu.org
2021-05-04 11:03 ` rguenther at suse dot de
2021-05-04 23:45 ` iains at gcc dot gnu.org
2021-05-04 23:48 ` iains at gcc dot gnu.org
2021-05-05  8:08 ` rguenth at gcc dot gnu.org
2021-05-05  8:48 ` rguenth at gcc dot gnu.org
2021-05-05 10:20 ` iains at gcc dot gnu.org
2021-05-05 11:58 ` rguenth at gcc dot gnu.org
2021-05-05 23:44 ` iains at gcc dot gnu.org
2021-05-06  8:08 ` cvs-commit at gcc dot gnu.org
2021-05-06  8:09 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).