public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check)
@ 2020-08-03  3:03 asolokha at gmx dot com
  2020-08-07 10:08 ` [Bug tree-optimization/96424] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2020-08-03  3:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96424
           Summary: ICE: verify_flow_info failed (error: wrong outgoing
                    edge flags at end of bb 23); or ICE: Segmentation
                    fault (in
                    expand_omp_for_init_vars/contains_struct_check)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

1.

g++-11.0.0-alpha20200726 snapshot (g:39ddfef9a5c24acf6412236f52f6716c8e0ebc9e)
ICEs when compiling the following testcase, reduced from
libgomp/testsuite/libgomp.c/loop-18.c, w/ -fbranch-probabilities
-fnon-call-exceptions -fopenmp:

int
main ()
{
  int i, j;

#pragma omp for collapse (2)
  for (i = 0; i < 1; ++i)
    for (j = 0; j <= i; ++j)
      {
      }

  return 0;
}

% g++-11.0.0 -fbranch-probabilities -fnon-call-exceptions -fopenmp -c
qr6y7wzi.c
qr6y7wzi.c: In function 'int main()':
qr6y7wzi.c:13:1: error: wrong outgoing edge flags at end of bb 23
   13 | }
      | ^
during IPA pass: profile
qr6y7wzi.c:13:1: internal compiler error: verify_flow_info failed
0xb80b56 verify_flow_info()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/cfghooks.c:269
0x105e7e7 checking_verify_flow_info
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/cfghooks.h:212
0x105e7e7 gimple_flow_call_edges_add
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-cfg.c:8622
0xf81fdd branch_prob(bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/profile.c:1099
0x10fe836 tree_profiling
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-profile.c:779
0x10fe836 execute
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-profile.c:885

2.

Replacing <= w/ < yields the following instead:

--- qr6y7wzi.c
+++ #<buffer qr6y7wzi.c>
@@ -5,7 +5,7 @@ main ()

 #pragma omp for collapse (2)
   for (i = 0; i < 1; ++i)
-    for (j = 0; j <= i; ++j)
+    for (j = 0; j < i; ++j)
       {
       }


% g++-11.0.0 -fbranch-probabilities -fnon-call-exceptions -fopenmp -c
qr6y7wzi.c
during GIMPLE pass: ompexp
qr6y7wzi.c: In function 'int main()':
qr6y7wzi.c:6:9: internal compiler error: Segmentation fault
    6 | #pragma omp for collapse (2)
      |         ^~~
0x1028baf crash_signal
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/toplev.c:328
0xec69ae contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree.h:3416
0xec69ae expand_omp_for_init_vars
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:2271
0xeccbe2 expand_omp_for_static_nochunk
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:4969
0xedc6b4 expand_omp_for
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:7421
0xedcb8a expand_omp
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:9691
0xede96c execute_expand_omp
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:9920

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

* [Bug tree-optimization/96424] ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check)
  2020-08-03  3:03 [Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check) asolokha at gmx dot com
@ 2020-08-07 10:08 ` jakub at gcc dot gnu.org
  2020-08-08  9:09 ` cvs-commit at gcc dot gnu.org
  2020-08-08 11:36 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-07 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-08-07

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49018
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49018&action=edit
gcc11-pr96424.patch

Untested fix.

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

* [Bug tree-optimization/96424] ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check)
  2020-08-03  3:03 [Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check) asolokha at gmx dot com
  2020-08-07 10:08 ` [Bug tree-optimization/96424] " jakub at gcc dot gnu.org
@ 2020-08-08  9:09 ` cvs-commit at gcc dot gnu.org
  2020-08-08 11:36 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-08  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:87d6dae308d604bad111b1c0bfea7835888eed8d

commit r11-2614-g87d6dae308d604bad111b1c0bfea7835888eed8d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Aug 8 11:07:09 2020 +0200

    openmp: Avoid floating point comparison at the end of bb with
-fnon-call-exceptions

    The following testcase ICEs with -fexceptions -fnon-call-exceptions because
    in that mode floating point comparisons should not be done at the end of bb
    in GIMPLE_COND.  Fixed by forcing it into a bool SSA_NAME and comparing
that against
    false.

    2020-08-08  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/96424
            * omp-expand.c: Include tree-eh.h.
            (expand_omp_for_init_vars): Handle -fexceptions
-fnon-call-exceptions
            by forcing floating point comparison into a bool temporary.

            * c-c++-common/gomp/pr96424.c: New test.

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

* [Bug tree-optimization/96424] ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check)
  2020-08-03  3:03 [Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check) asolokha at gmx dot com
  2020-08-07 10:08 ` [Bug tree-optimization/96424] " jakub at gcc dot gnu.org
  2020-08-08  9:09 ` cvs-commit at gcc dot gnu.org
@ 2020-08-08 11:36 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-08 11:36 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-08-08 11:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  3:03 [Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check) asolokha at gmx dot com
2020-08-07 10:08 ` [Bug tree-optimization/96424] " jakub at gcc dot gnu.org
2020-08-08  9:09 ` cvs-commit at gcc dot gnu.org
2020-08-08 11:36 ` jakub 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).