public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc.
@ 2022-03-14 10:43 ro at gcc dot gnu.org
  2022-03-14 10:44 ` [Bug d/104911] " ro at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-14 10:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104911
           Summary: [12 regression] Comparison failure in gcc/d/typesem.o
                    etc.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
            Target: i?86-pc-solaris2.11, sparc-sun-solaris2.11

Between 20220311 (1375e2b62332351a8f9c928421cd1ea8b53c5127) and 20220313
(7e28750395889d16a9cba49cd5935ced7dc00ce8),
Solaris bootstrap failed with

Bootstrap comparison failure!
gcc/d/typesem.o differs
gcc/d/semantic3.o differs

This happens on both SPARC and x86, as and gas, 32 and 64-bit.

I'm attaching the stage2 and stage3 objects, both original and stripped as per
contrib/compare-debug.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
@ 2022-03-14 10:44 ` ro at gcc dot gnu.org
  2022-03-14 10:45 ` ro at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-14 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 52622
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52622&action=edit
stage 2 and 3 objects

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
  2022-03-14 10:44 ` [Bug d/104911] " ro at gcc dot gnu.org
@ 2022-03-14 10:45 ` ro at gcc dot gnu.org
  2022-03-14 18:26 ` ibuclaw at gdcproject dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-14 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
  2022-03-14 10:44 ` [Bug d/104911] " ro at gcc dot gnu.org
  2022-03-14 10:45 ` ro at gcc dot gnu.org
@ 2022-03-14 18:26 ` ibuclaw at gdcproject dot org
  2022-03-14 21:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ibuclaw at gdcproject dot org @ 2022-03-14 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
That's interesting.  I've just done a build of
54ef95cc4d1f3f2cde7c1f13250f889ffb81ca75 (20220301) and I get the same
comparison failure.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-14 18:26 ` ibuclaw at gdcproject dot org
@ 2022-03-14 21:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2022-03-15 11:39 ` ro at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-03-14 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> That's interesting.  I've just done a build of
> 54ef95cc4d1f3f2cde7c1f13250f889ffb81ca75 (20220301) and I get the same
> comparison failure.

Weird: I've just run a reghunt to identify the culprit patch and it
converged on

commit 7e28750395889d16a9cba49cd5935ced7dc00ce8
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Sun Mar 13 12:28:05 2022 +0100

    d: Merge upstream dmd 02a3fafc6, druntime 26b58167, phobos 16cb085b5.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-03-14 21:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2022-03-15 11:39 ` ro at gcc dot gnu.org
  2022-03-15 14:07 ` ibuclaw at gdcproject dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2022-03-15 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 52630
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52630&action=edit
stage 2 and 3 objects and assembler output

I've now compiled typesem.d and semantic3.d using the stage 1 and 2 gdc
respectively
with -save-temps added (with a source tree as of
1b85638affe6c987a33427c54e0369b819cd7915,
i.e. before the problematic commit, so I could repeat the procedure before and
after with the same sources).

typesem.s indeed shows small codegen differences, while for semantic3.s there
are
both codegen differences per se as well as label renamings that may not effect
the
object files.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-03-15 11:39 ` ro at gcc dot gnu.org
@ 2022-03-15 14:07 ` ibuclaw at gdcproject dot org
  2022-03-18  9:45 ` ibuclaw at gdcproject dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ibuclaw at gdcproject dot org @ 2022-03-15 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
(In reply to Rainer Orth from comment #4)
> typesem.s indeed shows small codegen differences, while for semantic3.s
> there are
> both codegen differences per se as well as label renamings that may not
> effect the
> object files.
With typesem.s, it looks like `byte.min' (-128) is being turned into 128
somewhere.  Though I can't see how any change in the front-end would have
caused that.

With semantic3.s, it looks like the middle-end optimizer is removing some
branches as dead code, when there should be no way it would possibly be able to
infer that.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-03-15 14:07 ` ibuclaw at gdcproject dot org
@ 2022-03-18  9:45 ` ibuclaw at gdcproject dot org
  2022-03-18 10:21 ` ibuclaw at gdcproject dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ibuclaw at gdcproject dot org @ 2022-03-18  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Created attachment 52649
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52649&action=edit
fdump-tree-original

The corrupt is indeed coming from the front-end.

Attached tree dumps.

--- stage2/typesem.d.005t.original      2022-03-18 10:40:44.087366215 +0100
+++ stage3/typesem.d.005t.original      2022-03-18 10:41:11.776070215 +0100
@@ -2994,7 +2994,7 @@ struct Expression * visitBasic (const st
           switch ((int) __frame.mt->ty)
             {
               case 13:;
-              return <retval> = integerValue (&__frame, 18446744073709551488);
+              return <retval> = integerValue (&__frame, 128);
               case 14:;
               case 16:;
               case 18:;

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-03-18  9:45 ` ibuclaw at gdcproject dot org
@ 2022-03-18 10:21 ` ibuclaw at gdcproject dot org
  2022-03-21 19:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ibuclaw at gdcproject dot org @ 2022-03-18 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=104738

--- Comment #7 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Ah, yes, of course.

libdruntime/core/stdc/stdint.d:
---
alias int8_t   = char;
alias uint8_t  = ubyte;

dmd/globals.d:
---
alias d_int8 = int8_t;
alias d_uns8 = uint8_t;

dmd/expression.d:
---
case Tint8:
    result = cast(d_int8)value;
    break;

case Tchar:
case Tuns8:
    result = cast(d_uns8)value;
    break;
---

D sees both char and ubyte as having the same signed-ness.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-03-18 10:21 ` ibuclaw at gdcproject dot org
@ 2022-03-21 19:56 ` cvs-commit at gcc dot gnu.org
  2022-03-21 19:59 ` ibuclaw at gdcproject dot org
  2022-03-23 12:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-21 19:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

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

commit r12-7737-gfbdaa58162ee4189f441b75170af89215465d189
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Mon Mar 21 16:52:40 2022 +0100

    d: Merge upstream dmd 2503f17e5, phobos a74fa63e6.

    D front-end changes:

        - Import dmd mainline development.
        - Removed internal d_intN and d_unsN aliases to stdint types, which
          caused a regression on Solaris where int8_t is a char (PR104911).

    Phobos changes:

        - Import phobos mainline development.

            PR d/104911

    gcc/d/ChangeLog:

            * dmd/MERGE: Merge upstream dmd 2503f17e5.
            * d-convert.cc (convert_expr): Replace d_uns64 with dinteger_t.
            * d-lang.cc: Remove dmd/root/file.h include.
            (d_handle_option): Update for new front-end interface.
            (d_parse_file): Likewise.

    libphobos/ChangeLog:

            * src/MERGE: Merge upstream phobos a74fa63e6.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-03-21 19:56 ` cvs-commit at gcc dot gnu.org
@ 2022-03-21 19:59 ` ibuclaw at gdcproject dot org
  2022-03-23 12:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
  10 siblings, 0 replies; 12+ messages in thread
From: ibuclaw at gdcproject dot org @ 2022-03-21 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

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

--- Comment #9 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
This should be fine now.

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

* [Bug d/104911] [12 regression] Comparison failure in gcc/d/typesem.o etc.
  2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-03-21 19:59 ` ibuclaw at gdcproject dot org
@ 2022-03-23 12:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
  10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-03-23 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #9 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> This should be fine now.

It is indeed: thanks a lot.

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

end of thread, other threads:[~2022-03-23 12:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 10:43 [Bug d/104911] New: [12 regression] Comparison failure in gcc/d/typesem.o etc ro at gcc dot gnu.org
2022-03-14 10:44 ` [Bug d/104911] " ro at gcc dot gnu.org
2022-03-14 10:45 ` ro at gcc dot gnu.org
2022-03-14 18:26 ` ibuclaw at gdcproject dot org
2022-03-14 21:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-03-15 11:39 ` ro at gcc dot gnu.org
2022-03-15 14:07 ` ibuclaw at gdcproject dot org
2022-03-18  9:45 ` ibuclaw at gdcproject dot org
2022-03-18 10:21 ` ibuclaw at gdcproject dot org
2022-03-21 19:56 ` cvs-commit at gcc dot gnu.org
2022-03-21 19:59 ` ibuclaw at gdcproject dot org
2022-03-23 12:06 ` ro at CeBiTec dot Uni-Bielefeld.DE

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).