public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/113731] New: [14 regression] ICE when building libbsd
@ 2024-02-02 22:11 sjames at gcc dot gnu.org
  2024-02-02 22:14 ` [Bug middle-end/113731] " sjames at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-02 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113731
           Summary: [14 regression] ICE when building libbsd
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: tnfchris at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57300
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57300&action=edit
inet_net_pton.i

[This is trunk at r14-8727-gf4998609908e49 with
https://inbox.sourceware.org/gcc-patches/VI1PR08MB5325C266E259ACB3B572FAD6FF432@VI1PR08MB5325.eurprd08.prod.outlook.com/
applied on top. Just filing as it's easier than giving lots of diff. logs on
IRC.]

I'll try reduce it now.

```
$ gcc -c inet_net_pton.i -O3 -march=znver2
during GIMPLE pass: vect
In file included from
/var/tmp/portage/dev-libs/libbsd-0.11.8/work/libbsd-0.11.8/src/inet_net_pton.c:28:
/usr/include/arpa/inet.h: In function ‘inet_net_pton’:
/usr/include/arpa/inet.h:89:12: internal compiler error: Segmentation fault
   89 | extern int inet_net_pton (int __af, const char *__cp,
      |            ^~~~~~~~~~~~~
0x562c4cda2376 crash_signal
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/toplev.cc:317
0x562c4dd1dfbe gsi_prev(gimple_stmt_iterator*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/gimple-iterator.h:236
0x562c4dd1dfbe move_early_exit_stmts
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vect-loop.cc:11804
0x562c4dd1dfbe vect_transform_loop(_loop_vec_info*, gimple*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vect-loop.cc:11969
0x562c4dfa47fd vect_transform_loops
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1006
0x562c4df19ab1 try_vectorize_loop_1
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1152
0x562c4df19ab1 try_vectorize_loop
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1182
0x562c4dc52028 execute
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1298
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.
```

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
@ 2024-02-02 22:14 ` sjames at gcc dot gnu.org
  2024-02-02 22:41 ` sjames at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-02 22:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
```
$ gcc -c inet_net_pton.i -O3 -march=znver2 -wrapper valgrind
==3723094== Memcheck, a memory error detector
==3723094== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==3723094== Using Valgrind-3.23.0.GIT and LibVEX; rerun with -h for copyright
info
==3723094== Command: /usr/libexec/gcc/x86_64-pc-linux-gnu/14/cc1 -fpreprocessed
inet_net_pton.i -quiet -dumpbase inet_net_pton.i -dumpbase-ext .i -march=znver2
-O3 -o /tmp/cclQ7eCN.s
==3723094==
==3723094== Invalid read of size 8
==3723094==    at 0x21DDFBE: UnknownInlinedFun (gimple-iterator.h:236)
==3723094==    by 0x21DDFBE: UnknownInlinedFun (tree-vect-loop.cc:11804)
==3723094==    by 0x21DDFBE: vect_transform_loop(_loop_vec_info*, gimple*)
(tree-vect-loop.cc:11969)
==3723094==    by 0x24647FD: vect_transform_loops(hash_table<simduid_to_vf,
false, xcallocator>*&, loop*, gimple*, function*) [clone .lto_priv.0]
(tree-vectorizer.cc:1006)
==3723094==    by 0x23D9AB1: UnknownInlinedFun (tree-vectorizer.cc:1152)
==3723094==    by 0x23D9AB1: try_vectorize_loop(hash_table<simduid_to_vf,
false, xcallocator>*&, unsigned int*, loop*, function*)
(tree-vectorizer.cc:1182)
==3723094==    by 0x2112028: (anonymous
namespace)::pass_vectorize::execute(function*) [clone .lto_priv.0]
(tree-vectorizer.cc:1298)
==3723094==    by 0x1B18654: execute_one_pass(opt_pass*) (passes.cc:2646)
==3723094==    by 0x1BDC0EB: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==3723094==    by 0x1BDC108: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==3723094==    by 0x1BDC108: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==3723094==    by 0x1BDBE18: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==3723094==    by 0x2295983: cgraph_node::expand() (cgraphunit.cc:1843)
==3723094==    by 0x1B14F13: UnknownInlinedFun (cgraphunit.cc:2026)
==3723094==    by 0x1B14F13: symbol_table::compile() (cgraphunit.cc:2400)
==3723094==    by 0x22A7598: symbol_table::finalize_compilation_unit()
(cgraphunit.cc:2585)
==3723094==  Address 0x20 is not stack'd, malloc'd or (recently) free'd
==3723094==
during GIMPLE pass: vect
In file included from
/var/tmp/portage/dev-libs/libbsd-0.11.8/work/libbsd-0.11.8/src/inet_net_pton.c:28:
/usr/include/arpa/inet.h: In function ‘inet_net_pton’:
/usr/include/arpa/inet.h:89:12: internal compiler error: Segmentation fault
   89 | extern int inet_net_pton (int __af, const char *__cp,
      |            ^~~~~~~~~~~~~
0x1262376 crash_signal
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/toplev.cc:317
0x21ddfbe gsi_prev(gimple_stmt_iterator*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/gimple-iterator.h:236
0x21ddfbe move_early_exit_stmts
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vect-loop.cc:11804
0x21ddfbe vect_transform_loop(_loop_vec_info*, gimple*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vect-loop.cc:11969
0x24647fd vect_transform_loops
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1006
0x23d9ab1 try_vectorize_loop_1
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1152
0x23d9ab1 try_vectorize_loop
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1182
0x2112028 execute
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/tree-vectorizer.cc:1298
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.
```

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
  2024-02-02 22:14 ` [Bug middle-end/113731] " sjames at gcc dot gnu.org
@ 2024-02-02 22:41 ` sjames at gcc dot gnu.org
  2024-02-02 22:53 ` sjames at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-02 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
```
char* inet_net_pton_ipv4_bits;
char inet_net_pton_ipv4_odst;
void __errno_location();
void inet_net_pton_ipv4();
void inet_net_pton() { inet_net_pton_ipv4(); }
void inet_net_pton_ipv4(char *dst, int size) {
  while ((inet_net_pton_ipv4_bits > dst) & inet_net_pton_ipv4_odst) {
    if (size-- <= 0)
      goto emsgsize;
    *dst++ = '\0';
  }
emsgsize:
  __errno_location();
}
```

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
  2024-02-02 22:14 ` [Bug middle-end/113731] " sjames at gcc dot gnu.org
  2024-02-02 22:41 ` sjames at gcc dot gnu.org
@ 2024-02-02 22:53 ` sjames at gcc dot gnu.org
  2024-02-02 23:08 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-02 22:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
I also get a new libarchive test failure with it:
```
test_read_format_rar5_extra_field_version

/var/tmp/portage/app-arch/libarchive-3.7.2/work/libarchive-3.7.2/libarchive/test/test_read_format_rar5.c:106:
bytes_read != fsize
      bytes_read=-30 (0xffffffffffffffe2, 01777777777777777777742)
      fsize=95 (0x5f, 0137)
/var/tmp/portage/app-arch/libarchive-3.7.2/work/libarchive-3.7.2/libarchive/test/test_read_format_rar5.c:955:
Assertion failed: 0 == extract_one(a, ae, 0xF24181B7)
    errno: 22
   detail: Unpacker has written too many bytes
/var/tmp/portage/app-arch/libarchive-3.7.2/work/libarchive-3.7.2/libarchive/test/test_read_format_rar5.c:111:
computed_crc != crc
      computed_crc=1827567249 (0x6cee7691, 015473473221)
      crc=4064379319 (0xf24181b7, 036220300667)
```

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-02 22:53 ` sjames at gcc dot gnu.org
@ 2024-02-02 23:08 ` pinskia at gcc dot gnu.org
  2024-02-03  7:36 ` [Bug middle-end/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7 tnfchris at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-02 23:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |pinskia at gcc dot gnu.org
   Target Milestone|---                         |14.0

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-02 23:08 ` pinskia at gcc dot gnu.org
@ 2024-02-03  7:36 ` tnfchris at gcc dot gnu.org
  2024-02-03  7:50 ` sjames at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-02-03  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-02-03
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |tnfchris at gcc dot gnu.org

--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
blah,

      gsi_move_before (&stmt_gsi, &dest_gsi);

when dest_gsi is empty does not move the pointer.  It's not mentioned in the
description but in the function it eventually calls gsi_insert_before there's a
comment

/* If CUR is NULL, we link at the end of the sequence (this case happens

so it adds it to the end instead of start like you asked.

diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
index 30b90d99925..e2587315020 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -11801,7 +11801,8 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)

       gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
       gsi_move_before (&stmt_gsi, &dest_gsi);
-      gsi_prev (&dest_gsi);
+      if (!gsi_end_p (dest_gsi))
+       gsi_prev (&dest_gsi);
     }

fixes it.

the libarchive, is that also with -march=znver2? and is
https://github.com/libarchive/libarchive?

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

* [Bug middle-end/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-03  7:36 ` [Bug middle-end/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7 tnfchris at gcc dot gnu.org
@ 2024-02-03  7:50 ` sjames at gcc dot gnu.org
  2024-02-05 15:12 ` [Bug tree-optimization/113731] " tnfchris at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-03  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
> the libarchive, is that also with -march=znver2? and is
> https://github.com/libarchive/libarchive?

Yeah, filed PR113734 for it.

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-02-03  7:50 ` sjames at gcc dot gnu.org
@ 2024-02-05 15:12 ` tnfchris at gcc dot gnu.org
  2024-02-07  3:08 ` sjames at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-02-05 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

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

--- Comment #6 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
*** Bug 113771 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-02-05 15:12 ` [Bug tree-optimization/113731] " tnfchris at gcc dot gnu.org
@ 2024-02-07  3:08 ` sjames at gcc dot gnu.org
  2024-02-07  9:03 ` doko at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-07  3:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
*** Bug 113794 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-02-07  3:08 ` sjames at gcc dot gnu.org
@ 2024-02-07  9:03 ` doko at gcc dot gnu.org
  2024-02-07  9:08 ` tnfchris at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: doko at gcc dot gnu.org @ 2024-02-07  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Matthias Klose <doko at gcc dot gnu.org> ---
the proposed patch doesn't fix the amdgcn-amdhsa bootstrap.

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-02-07  9:03 ` doko at gcc dot gnu.org
@ 2024-02-07  9:08 ` tnfchris at gcc dot gnu.org
  2024-02-07 10:00 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-02-07  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Matthias Klose from comment #8)
> the proposed patch doesn't fix the amdgcn-amdhsa bootstrap.

So what is the error with the patch? The output can't be the same as the
function was removed.

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-02-07  9:08 ` tnfchris at gcc dot gnu.org
@ 2024-02-07 10:00 ` burnus at gcc dot gnu.org
  2024-02-07 10:59 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: burnus at gcc dot gnu.org @ 2024-02-07 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #9)
> (In reply to Matthias Klose from comment #8)
> > the proposed patch doesn't fix the amdgcn-amdhsa bootstrap.
> 
> So what is the error with the patch? The output can't be the same as the
> function was removed.

For what it is worth, Jakub's patch (based on Tamar's patch email ),
https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645062.html ,
works here, i.e. I can build GCC with the current in-tree newlib.

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-02-07 10:00 ` burnus at gcc dot gnu.org
@ 2024-02-07 10:59 ` cvs-commit at gcc dot gnu.org
  2024-02-07 11:00 ` tnfchris at gcc dot gnu.org
  2024-02-07 21:00 ` sjames at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-07 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:

https://gcc.gnu.org/g:8f6ed71d8fff3c3c6249651a72aee084e31ffb9e

commit r14-8839-g8f6ed71d8fff3c3c6249651a72aee084e31ffb9e
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Wed Feb 7 10:58:25 2024 +0000

    middle-end: fix ICE when moving statements to empty BB [PR113731]

    We use gsi_move_before (&stmt_gsi, &dest_gsi); to request that the new
statement
    be placed before any other statement.  Typically this then moves the
current
    pointer to be after the statement we just inserted.

    However it looks like when the BB is empty, this does not happen and the
CUR
    pointer stays NULL.   There's a comment in the source of gsi_insert_before
that
    explains:

    /* If CUR is NULL, we link at the end of the sequence (this case happens

    This adds a default parameter to gsi_move_before to allow us to control
where
    the insertion happens.

    gcc/ChangeLog:

            PR tree-optimization/113731
            * gimple-iterator.cc (gsi_move_before): Take new parameter for
update
            method.
            * gimple-iterator.h (gsi_move_before): Default new param to
            GSI_SAME_STMT.
            * tree-vect-loop.cc (move_early_exit_stmts): Call gsi_move_before
with
            GSI_NEW_STMT.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/113731
            * gcc.dg/vect/vect-early-break_111-pr113731.c: New test.

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-02-07 10:59 ` cvs-commit at gcc dot gnu.org
@ 2024-02-07 11:00 ` tnfchris at gcc dot gnu.org
  2024-02-07 21:00 ` sjames at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-02-07 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

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

--- Comment #12 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
fixed

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

* [Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7
  2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2024-02-07 11:00 ` tnfchris at gcc dot gnu.org
@ 2024-02-07 21:00 ` sjames at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-07 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #13 from Sam James <sjames at gcc dot gnu.org> ---
*** Bug 113817 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2024-02-07 21:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 22:11 [Bug middle-end/113731] New: [14 regression] ICE when building libbsd sjames at gcc dot gnu.org
2024-02-02 22:14 ` [Bug middle-end/113731] " sjames at gcc dot gnu.org
2024-02-02 22:41 ` sjames at gcc dot gnu.org
2024-02-02 22:53 ` sjames at gcc dot gnu.org
2024-02-02 23:08 ` pinskia at gcc dot gnu.org
2024-02-03  7:36 ` [Bug middle-end/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7 tnfchris at gcc dot gnu.org
2024-02-03  7:50 ` sjames at gcc dot gnu.org
2024-02-05 15:12 ` [Bug tree-optimization/113731] " tnfchris at gcc dot gnu.org
2024-02-07  3:08 ` sjames at gcc dot gnu.org
2024-02-07  9:03 ` doko at gcc dot gnu.org
2024-02-07  9:08 ` tnfchris at gcc dot gnu.org
2024-02-07 10:00 ` burnus at gcc dot gnu.org
2024-02-07 10:59 ` cvs-commit at gcc dot gnu.org
2024-02-07 11:00 ` tnfchris at gcc dot gnu.org
2024-02-07 21:00 ` sjames 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).