public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
@ 2024-06-25  9:45 sjames at gcc dot gnu.org
  2024-06-25 10:13 ` [Bug bootstrap/115635] " rguenth at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-25  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115635
           Summary: [15 regression] Bootstrap fails with failed self-test
                    (diagnostic-path.cc:1153: test_empty_path: FAIL:
                    ASSERT_FALSE ((path.interprocedural_p ())))
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

I'll try to reproduce standalone outside of packaging later.

While I suspected diagnostic changes from a few days ago, I bootstrapped fine
just 6 hours or so ago. But hopefully it's something simpler than a
miscompilation. Will see.

```
# /var/tmp/portage/sys-devel/gcc-15.0.9999/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/gcc-15.0.9999/work/build/./gcc/  -xrust
-frust-incomplete-and-experimental-compiler-do-not-use -nostdinc /dev/null -S
-o /dev/null
-fself-test=/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/testsuite/selftests
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:1153:
test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))
crab1: internal compiler error: in fail, at selftest.cc:47
0x55f7b4fcd656 selftest::fail(selftest::location const&, char const*)
       
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/selftest.cc:47
0x55f7b4ff8ec0 test_empty_path
       
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:1153
0x55f7b4ff9aae selftest::diagnostic_path_cc_tests()
       
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:2379
0x55f7b4f9b6f1 selftest::run_tests()
       
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/selftest-run-tests.cc:105
0x55f7b485240c toplev::run_self_tests()
       
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/toplev.cc:2223
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
# /var/tmp/portage/sys-devel/gcc-15.0.9999/work/build/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/var/tmp/portage/sys-devel/gcc-15.0.9999/work/build/./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/15
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python
--enable-languages=c,c++,fortran,rust --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
15.0.9999 p, commit e275a9e2e7e85e8c0071f7cffbd7948bc891573d'
--with-gcc-major-version-only --enable-libstdcxx-time --enable-lto
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --disable-cet
--disable-systemtap --enable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --with-isl --disable-isl-version-check
--enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3
bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240625 (experimental)
30db57901ccac7027f93ff71e70a66e26a4f70f5 (Gentoo Hardened 15.0.9999 p, commit
e275a9e2e7e85e8c0071f7cffbd7948bc891573d)
```

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
@ 2024-06-25 10:13 ` rguenth at gcc dot gnu.org
  2024-06-25 14:05 ` dmalcolm at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-25 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.0
            Version|unknown                     |15.0

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
  2024-06-25 10:13 ` [Bug bootstrap/115635] " rguenth at gcc dot gnu.org
@ 2024-06-25 14:05 ` dmalcolm at gcc dot gnu.org
  2024-06-26  3:25 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe " sjames at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2024-06-25 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
"make selftest-valgrind" is clean for me.  Note that if you can reproducer this
standalone, "make selftest-gdb" is a handy way to run the selftests under the
debugger.

FWIW, the output suggests that the assertion at line 1153 is failing:

  1147  /* Verify that empty paths are handled gracefully.  */
  1148  
  1149  static void
  1150  test_empty_path (pretty_printer *event_pp)
  1151  {
  1152    test_diagnostic_path path (event_pp);
->1153    ASSERT_FALSE (path.interprocedural_p ());
  1154  

"path" is empty i.e. num_events ought to be returning 0.

Hence I'd expect diagnostic_path::interprocedural_p:

   184  bool
   185  diagnostic_path::interprocedural_p () const
   186  {
   187    /* Ignore leading events that are outside of any function.  */
   188    unsigned first_fn_event_idx;
   189    if (!get_first_event_in_a_function (&first_fn_event_idx))
   190      return false;

to call get_first_event_in_a_function, and for that to get 0 for "num", and
thus bail out with num == 0 again, never entering the loop here:

   164  bool
   165  diagnostic_path::get_first_event_in_a_function (unsigned *out_idx)
const
   166  {
   167    const unsigned num = num_events ();
   168    for (unsigned i = 0; i < num; i++)
   169      {
   170        const diagnostic_event &event = get_event (i);
   171        if (const logical_location *logical_loc =
event.get_logical_location ())
   172          if (logical_loc->function_p ())
   173            {
   174              *out_idx = i;
   175              return true;
   176            }
   177      }
   178    return false;
   179  }

thus returning false to the callsite at line 189, and thus having
diagnostic_path::interprocedural_p return false at line 190:

   189    if (!get_first_event_in_a_function (&first_fn_event_idx))
   190      return false;

So I'm not sure what's happening here (or maybe I'm missing something silly?)

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
  2024-06-25 10:13 ` [Bug bootstrap/115635] " rguenth at gcc dot gnu.org
  2024-06-25 14:05 ` dmalcolm at gcc dot gnu.org
@ 2024-06-26  3:25 ` sjames at gcc dot gnu.org
  2024-06-26  3:28 ` sjames at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26  3:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #1)
> "make selftest-valgrind" is clean for me.  Note that if you can reproducer
> this standalone, "make selftest-gdb" is a handy way to run the selftests
> under the debugger.

Thanks, this is helpful. I can reproduce it consistently when running gcc
manually once the PM has built it, but not yet managed to reproduce with a
manual build yet.

> 
> FWIW, the output suggests that the assertion at line 1153 is failing:
> 
>   1147  /* Verify that empty paths are handled gracefully.  */
>   1148  
>   1149  static void
>   1150  test_empty_path (pretty_printer *event_pp)
>   1151  {
>   1152    test_diagnostic_path path (event_pp);
> ->1153    ASSERT_FALSE (path.interprocedural_p ());
>   1154  
> 
> "path" is empty i.e. num_events ought to be returning 0.
> 
> Hence I'd expect diagnostic_path::interprocedural_p:
> 
>    184  bool
>    185  diagnostic_path::interprocedural_p () const
>    186  {
>    187    /* Ignore leading events that are outside of any function.  */
>    188    unsigned first_fn_event_idx;
>    189    if (!get_first_event_in_a_function (&first_fn_event_idx))
>    190      return false;
> 
> to call get_first_event_in_a_function, and for that to get 0 for "num", and
> thus bail out with num == 0 again, never entering the loop here:
> 

OK, I set a breakpoint for interprocedural_p, and I hit it immediately:
(gdb) n
189       if (!get_first_event_in_a_function (&first_fn_event_idx))
(gdb) p first_fn_event_idx
$8 = 0

First, we don't know num:
(gdb) s
diagnostic_path::get_first_event_in_a_function (this=this@entry=0x7fffffffd078,
out_idx=out_idx@entry=0x7fffffffd014)
    at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:167
167       const unsigned num = num_events ();
(gdb) p num
$9 = <optimized out>


Stepping a handful of times, we get to the for loop for the first time:
(gdb) s
diagnostic_path::get_first_event_in_a_function (this=this@entry=0x7fffffffd078,
out_idx=out_idx@entry=0x7fffffffd014)
    at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:168
168       for (unsigned i = 0; i < num; i++)
(gdb) p num
$11 = 0

(gdb) bt
#0  diagnostic_path::get_first_event_in_a_function
(this=this@entry=0x7fffffffd078, out_idx=out_idx@entry=0x7fffffffd014)
    at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:168
#1  0x0000555556ebc723 in diagnostic_path::interprocedural_p
(this=this@entry=0x7fffffffd078) at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:189
#2  0x0000555556ee1bf3 in selftest::test_empty_path
(event_pp=event_pp@entry=0x5555587648f0) at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:1153
#3  0x0000555556ee2804 in selftest::diagnostic_path_cc_tests () at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/diagnostic-path.cc:2379
#4  0x0000555556e8584c in selftest::run_tests () at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/selftest-run-tests.cc:105
#5  0x000055555675cb73 in toplev::run_self_tests (this=<optimized out>) at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/toplev.cc:2223
#6  0x00005555577b0009 in toplev::main (this=this@entry=0x7fffffffd416,
argc=<optimized out>, argv=<optimized out>)
    at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/toplev.cc:2327
#7  0x00005555577ae5ee in main (argc=<optimized out>, argv=<optimized out>) at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/main.cc:39
(gdb)

(gdb) s
selftest::test_empty_path (event_pp=event_pp@entry=0x5555587648f0) at
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/selftest.h:38
38        location (const char *file, int line, const char *function)
(gdb) s
1153      ASSERT_FALSE (path.interprocedural_p ());
(gdb)

(gdb) p path
$13 = {<diagnostic_path> = {_vptr.diagnostic_path = 0x5555584b5cc0 <vtable for
selftest::test_diagnostic_path+16>},
  m_threads = {<auto_vec<selftest::test_diagnostic_thread*, 0>> =
{<vec<selftest::test_diagnostic_thread*, va_heap, vl_ptr>> = {
        m_vec = 0x555558840780}, <No data fields>}, <No data fields>},
  m_events = {<auto_vec<selftest::test_diagnostic_event*, 0>> =
{<vec<selftest::test_diagnostic_event*, va_heap, vl_ptr>> = {m_vec = 0x0}, <No
data fields>}, <No data fields>},
  m_event_pp = 0x5555587648f0}

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-06-26  3:25 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe " sjames at gcc dot gnu.org
@ 2024-06-26  3:28 ` sjames at gcc dot gnu.org
  2024-06-26  3:32 ` sjames at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26  3:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
(gdb) p m_events
$16 = {<auto_vec<selftest::test_diagnostic_event*, 0>> =
{<vec<selftest::test_diagnostic_event*, va_heap, vl_ptr>> = {m_vec = 0x0}, <No
data fields>}, <No data fields>}
(gdb)

Then
(gdb) p m_vec
$17 = (vec<selftest::test_diagnostic_event*, va_heap, vl_embed> *) 0x0

Then

(gdb) s
1153      ASSERT_FALSE (path.interprocedural_p ());
(gdb) p path
$19 = {<diagnostic_path> = {_vptr.diagnostic_path = 0x5555584b5cc0 <vtable for
selftest::test_diagnostic_path+16>},
  m_threads = {<auto_vec<selftest::test_diagnostic_thread*, 0>> =
{<vec<selftest::test_diagnostic_thread*, va_heap, vl_ptr>> = {
        m_vec = 0x555558840780}, <No data fields>}, <No data fields>},
  m_events = {<auto_vec<selftest::test_diagnostic_event*, 0>> =
{<vec<selftest::test_diagnostic_event*, va_heap, vl_ptr>> = {m_vec = 0x0}, <No
data fields>}, <No data fields>},
  m_event_pp = 0x5555587648f0}

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-06-26  3:28 ` sjames at gcc dot gnu.org
@ 2024-06-26  3:32 ` sjames at gcc dot gnu.org
  2024-06-26  6:10 ` sjames at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26  3:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
(gdb) call get_first_event_in_a_function (&first_fn_event_idx)
$20 = false

???

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-06-26  3:32 ` sjames at gcc dot gnu.org
@ 2024-06-26  6:10 ` sjames at gcc dot gnu.org
  2024-06-26  7:02 ` sjames at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26  6:10 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
pretty sure it's a miscompilation, gathering more info. Needed profilebootstrap
to repro.

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-06-26  6:10 ` sjames at gcc dot gnu.org
@ 2024-06-26  7:02 ` sjames at gcc dot gnu.org
  2024-06-26 11:38 ` sjames at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26  7:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Sam James <sjames at gcc dot gnu.org> ---
In theory, the bisect list is tiny:
```
$ git shortlog
55947b32c38a40777aedbd105bd94b43a42c2a10..30db57901ccac7027f93ff71e70a66e26a4f70f5
Evgeny Karpov (6):
      Move mingw_* declarations to the mingw folder
      Extract ix86 dllimport implementation to mingw
      Rename functions for reuse in AArch64
      aarch64: Add selectany attribute handling
      Adjust DLL import/export implementation for AArch64
      aarch64: Add DLL import/export to AArch64 target

Jakub Jelinek (1):
      c: Fix ICE related to incomplete structures in C23 [PR114930]

Jeff Law (1):
      [committed][RISC-V] Fix some of the testsuite fallout from late-combine
patch

Mark Harmstone (1):
      Handle structs and classes for CodeView
```

Not sure I really believe this though. Feels more likely the selftest maybe
succeeded by chance for the build so the LHS commit range is wrong.

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ())))
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-06-26  7:02 ` sjames at gcc dot gnu.org
@ 2024-06-26 11:38 ` sjames at gcc dot gnu.org
  2024-06-26 23:44 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4 sjames at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26 11:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
I'm bisecting but the above list contains r15-1599-g63512c72df09b4 which
PR115661 bisected to, so I'm starting to think it's right?

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-06-26 11:38 ` sjames at gcc dot gnu.org
@ 2024-06-26 23:44 ` sjames at gcc dot gnu.org
  2024-06-27  1:51 ` xry111 at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-26 23:44 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://gcc.gnu.org/bugzill |
                   |a/show_bug.cgi?id=115661    |
         Depends on|                            |115661
            Summary|[15 regression] Bootstrap   |[15 regression] Bootstrap
                   |fails with failed self-test |fails with failed self-test
                   |with the rust fe            |with the rust fe
                   |(diagnostic-path.cc:1153:   |(diagnostic-path.cc:1153:
                   |test_empty_path: FAIL:      |test_empty_path: FAIL:
                   |ASSERT_FALSE                |ASSERT_FALSE
                   |((path.interprocedural_p    |((path.interprocedural_p
                   |())))                       |()))) since
                   |                            |r15-1599-g63512c72df09b4

--- Comment #8 from Sam James <sjames at gcc dot gnu.org> ---
Yes, r15-1599-g63512c72df09b4. I'm going to call this a depends-on PR115661
because there's more analysis of the real problem in there. We can call it a
dupe if others prefer. Thanks!


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115661
[Bug 115661] [15 Regression] wrong code at -O{2,3} on x86_64-linux-gnu since
r15-1599-g63512c72df09b4

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-06-26 23:44 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4 sjames at gcc dot gnu.org
@ 2024-06-27  1:51 ` xry111 at gcc dot gnu.org
  2024-06-27  2:39 ` sjames at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-06-27  1:51 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xry111 at gcc dot gnu.org

--- Comment #9 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Sam James from comment #8)
> Yes, r15-1599-g63512c72df09b4. I'm going to call this a depends-on PR115661
> because there's more analysis of the real problem in there. We can call it a
> dupe if others prefer. Thanks!

Does your hack in 115661 work for this?

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-06-27  1:51 ` xry111 at gcc dot gnu.org
@ 2024-06-27  2:39 ` sjames at gcc dot gnu.org
  2024-06-27  7:25 ` Evgeny.Karpov at microsoft dot com
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-27  2:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Sam James <sjames at gcc dot gnu.org> ---
Yeah, just confirmed it works with
https://github.com/gentoo/gcc-patches/commit/e35c53788a928179ef26b76833bcbe297f84fe6a.

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-06-27  2:39 ` sjames at gcc dot gnu.org
@ 2024-06-27  7:25 ` Evgeny.Karpov at microsoft dot com
  2024-06-28  8:38 ` Evgeny.Karpov at microsoft dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Evgeny.Karpov at microsoft dot com @ 2024-06-27  7:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Evgeny Karpov <Evgeny.Karpov at microsoft dot com> ---
Thank you for reporting the issues and discussing the root causes. 
It helped in preparing the patch.

The patch is under review.
https://gcc.gnu.org/pipermail/gcc-patches/2024-June/655807.html

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-06-27  7:25 ` Evgeny.Karpov at microsoft dot com
@ 2024-06-28  8:38 ` Evgeny.Karpov at microsoft dot com
  2024-06-28  8:40 ` sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Evgeny.Karpov at microsoft dot com @ 2024-06-28  8:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Evgeny Karpov <Evgeny.Karpov at microsoft dot com> ---
Could you please confirm that the patch resolves the issue?

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2024-06-28  8:38 ` Evgeny.Karpov at microsoft dot com
@ 2024-06-28  8:40 ` sjames at gcc dot gnu.org
  2024-06-28 12:47 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-28  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Sam James <sjames at gcc dot gnu.org> ---
Hi Evgeny, I tested your patch last night and it works.

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2024-06-28  8:40 ` sjames at gcc dot gnu.org
@ 2024-06-28 12:47 ` cvs-commit at gcc dot gnu.org
  2024-06-28 12:50 ` clyon at gcc dot gnu.org
  2024-06-28 12:50 ` clyon at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-28 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Christophe Lyon <clyon@gcc.gnu.org>:

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

commit r15-1708-gc4b7b62bfa10816c1e08f0f9597d857f11379688
Author: Evgeny Karpov <Evgeny.Karpov@microsoft.com>
Date:   Fri Jun 28 12:37:12 2024 +0000

    i386: Fix regression after refactoring legitimize_pe_coff_symbol,
ix86_GOT_alias_set and PE_COFF_LEGITIMIZE_EXTERN_DECL [PR115635]

    This patch fixes 3 bugs reported after merging the "Add DLL
    import/export implementation to AArch64" series.
    https://gcc.gnu.org/pipermail/gcc-patches/2024-June/653955.html The
    series refactors the i386 codebase to reuse it in AArch64, which
    triggers some bugs.

    Bug 115661 - [15 Regression] wrong code at -O{2,3} on x86_64-linux-gnu
    since r15-1599-g63512c72df09b4
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115661

    Bug 115635 - [15 regression] Bootstrap fails with failed self-test
    with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL:
    ASSERT_FALSE ((path.interprocedural_p ()))) since
    r15-1599-g63512c72df09b4
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115635

    Issue 1. In some code, i386 has been relying on the
    legitimize_pe_coff_symbol call on all platforms and should return
    NULL_RTX if it is not supported.

    Fix: NULL_RTX handling has been added when the target does not support
    PECOFF.

    Issue 2. ix86_GOT_alias_set is used on all platforms and cannot be
    extracted to mingw.

    Fix: ix86_GOT_alias_set has been returned as it was and is used on all
    platforms for i386.

    Bug 115643 - [15 regression] aarch64-w64-mingw32 support today breaks
    x86_64-w64-mingw32 build cannot represent relocation type BFD_RELOC_64
    since r15-1602-ged20feebd9ea31
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115643

    Issue 3. PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED has been added and
    used with a negative operator for a complex expression without braces.

    Fix: Braces has been added, and
    PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED has been renamed to
    PE_COFF_LEGITIMIZE_EXTERN_DECL.

    2024-06-28  Evgeny Karpov <Evgeny.Karpov@microsoft.com>

            gcc/ChangeLog:
            PR bootstrap/115635
            PR target/115643
            PR target/115661
            * config/aarch64/cygming.h
            (PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED): Rename to
            PE_COFF_LEGITIMIZE_EXTERN_DECL.
            (PE_COFF_LEGITIMIZE_EXTERN_DECL): Likewise.
            * config/i386/cygming.h (GOT_ALIAS_SET): Remove the diffinition to
            reuse it from i386.h.
            (PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED): Rename to
            PE_COFF_LEGITIMIZE_EXTERN_DECL.
            (PE_COFF_LEGITIMIZE_EXTERN_DECL): Likewise.
            * config/i386/i386-expand.cc (ix86_expand_move): Return
            ix86_GOT_alias_set.
            * config/i386/i386-expand.h (ix86_GOT_alias_set): Likewise.
            * config/i386/i386.cc (ix86_GOT_alias_set): Likewise.
            * config/i386/i386.h (GOT_ALIAS_SET): Likewise.
            * config/mingw/winnt-dll.cc (get_dllimport_decl): Use
            GOT_ALIAS_SET.
            (legitimize_pe_coff_symbol): Rename to
            PE_COFF_LEGITIMIZE_EXTERN_DECL.
            * config/mingw/winnt-dll.h (ix86_GOT_alias_set): Declare
            ix86_GOT_alias_set.

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2024-06-28 12:47 ` cvs-commit at gcc dot gnu.org
@ 2024-06-28 12:50 ` clyon at gcc dot gnu.org
  2024-06-28 12:50 ` clyon at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: clyon at gcc dot gnu.org @ 2024-06-28 12:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115635
Bug 115635 depends on bug 115661, which changed state.

Bug 115661 Summary: [15 Regression] wrong code at -O{2,3} on x86_64-linux-gnu since r15-1599-g63512c72df09b4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115661

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

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

* [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4
  2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2024-06-28 12:50 ` clyon at gcc dot gnu.org
@ 2024-06-28 12:50 ` clyon at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: clyon at gcc dot gnu.org @ 2024-06-28 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

Christophe Lyon <clyon at gcc dot gnu.org> changed:

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

--- Comment #15 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Fixed

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

end of thread, other threads:[~2024-06-28 12:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25  9:45 [Bug bootstrap/115635] New: [15 regression] Bootstrap fails with failed self-test (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) sjames at gcc dot gnu.org
2024-06-25 10:13 ` [Bug bootstrap/115635] " rguenth at gcc dot gnu.org
2024-06-25 14:05 ` dmalcolm at gcc dot gnu.org
2024-06-26  3:25 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe " sjames at gcc dot gnu.org
2024-06-26  3:28 ` sjames at gcc dot gnu.org
2024-06-26  3:32 ` sjames at gcc dot gnu.org
2024-06-26  6:10 ` sjames at gcc dot gnu.org
2024-06-26  7:02 ` sjames at gcc dot gnu.org
2024-06-26 11:38 ` sjames at gcc dot gnu.org
2024-06-26 23:44 ` [Bug bootstrap/115635] [15 regression] Bootstrap fails with failed self-test with the rust fe (diagnostic-path.cc:1153: test_empty_path: FAIL: ASSERT_FALSE ((path.interprocedural_p ()))) since r15-1599-g63512c72df09b4 sjames at gcc dot gnu.org
2024-06-27  1:51 ` xry111 at gcc dot gnu.org
2024-06-27  2:39 ` sjames at gcc dot gnu.org
2024-06-27  7:25 ` Evgeny.Karpov at microsoft dot com
2024-06-28  8:38 ` Evgeny.Karpov at microsoft dot com
2024-06-28  8:40 ` sjames at gcc dot gnu.org
2024-06-28 12:47 ` cvs-commit at gcc dot gnu.org
2024-06-28 12:50 ` clyon at gcc dot gnu.org
2024-06-28 12:50 ` clyon 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).