public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps
@ 2022-09-14  4:48 asolokha at gmx dot com
  2022-09-14  7:06 ` [Bug tree-optimization/106938] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-09-14  4:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106938
           Summary: [13 Regression] ICE in
                    predicate::init_from_control_deps
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: hubicka at gcc dot gnu.org, rguenth at gcc dot gnu.org
  Target Milestone: ---

gcc 13.0.0 20220911 snapshot (g:0ea5e3f4542832b8da016b152695e64a2a386309) ICEs
when compiling the following testcase w/ -O1 -fno-ipa-pure-const -fno-tree-ccp
-Wuninitialized:

int n;

void
undefined (void);

__attribute__ ((returns_twice)) int
zero (void)
{
  return 0;
}

void
bar (int)
{
  int i;

  for (i = 0; i < -1; ++i)
    n = 0;
}

__attribute__ ((simd)) void
foo (void)
{
  int uninitialized;

  undefined ();

  while (uninitialized < 1)
    {
      bar (zero ());
      ++uninitialized;
    }
}

% gcc-13.0.0 -O1 -fno-ipa-pure-const -fno-tree-ccp -Wuninitialized -w -c
r1v5kswd.c
during GIMPLE pass: uninit
r1v5kswd.c: In function 'foo.simdclone.0':
r1v5kswd.c:22:1: internal compiler error: Segmentation fault
   22 | foo (void)
      | ^~~
0xeebbdf crash_signal
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/toplev.cc:314
0x1d2a191 gimple_code
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple.h:1807
0x1d2a191 predicate::init_from_control_deps(vec<edge_def*, va_heap, vl_ptr>
const*, unsigned int, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple-predicate-analysis.cc:1776
0x1d2cc00 predicate::init_from_control_deps(vec<edge_def*, va_heap, vl_ptr>
const*, unsigned int, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple-predicate-analysis.cc:1722
0x1d2cc00 uninit_analysis::init_from_phi_def(gphi*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple-predicate-analysis.cc:2116
0x1d2e9ab uninit_analysis::is_use_guarded(gimple*, basic_block_def*, gphi*,
unsigned int, hash_set<gphi*, false, default_hash_traits<gphi*> >*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple-predicate-analysis.cc:2172
0x1d2ef59 uninit_analysis::is_use_guarded(gimple*, basic_block_def*, gphi*,
unsigned int)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/gimple-predicate-analysis.cc:2195
0x1140e01 find_uninit_use
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/tree-ssa-uninit.cc:1238
0x1141756 warn_uninitialized_phi
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/tree-ssa-uninit.cc:1308
0x1141756 execute_late_warn_uninitialized
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/tree-ssa-uninit.cc:1429
0x1141756 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220911/work/gcc-13-20220911/gcc/tree-ssa-uninit.cc:1446

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

* [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps
  2022-09-14  4:48 [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps asolokha at gmx dot com
@ 2022-09-14  7:06 ` rguenth at gcc dot gnu.org
  2022-09-14  8:01 ` [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7 marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-14  7:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Last reconfirmed|                            |2022-09-14

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oh, another case.

t.c:22:1: error: basic block 3 has no control altering stmt but 2 outgoing
edges
   22 | foo (void)
      | ^~~

<bb 3> [local count: 440058051]:
# uninitialized_3(ab) = PHI <uninitialized_6(ab)(4), uninitialized_5(6)>
goto <bb 5>; [99.96%]

I suppose I should try to push the part of the verifier that "works".  I'm
going to keep the assert in uninit analysis since it's nice to catch all these
bugs.

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

* [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7
  2022-09-14  4:48 [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps asolokha at gmx dot com
  2022-09-14  7:06 ` [Bug tree-optimization/106938] " rguenth at gcc dot gnu.org
@ 2022-09-14  8:01 ` marxin at gcc dot gnu.org
  2022-09-14 12:51 ` cvs-commit at gcc dot gnu.org
  2022-09-14 12:51 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-14  8:01 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
            Summary|[13 Regression] ICE in      |[13 Regression] ICE in
                   |predicate::init_from_contro |predicate::init_from_contro
                   |l_deps                      |l_deps since
                   |                            |r13-2500-g0a4a2667dc115ca7

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r13-2500-g0a4a2667dc115ca7.

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

* [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7
  2022-09-14  4:48 [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps asolokha at gmx dot com
  2022-09-14  7:06 ` [Bug tree-optimization/106938] " rguenth at gcc dot gnu.org
  2022-09-14  8:01 ` [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7 marxin at gcc dot gnu.org
@ 2022-09-14 12:51 ` cvs-commit at gcc dot gnu.org
  2022-09-14 12:51 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-14 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:cd14c97cd92ca11c66ee3d8dc4dd543c5aa8e024

commit r13-2664-gcd14c97cd92ca11c66ee3d8dc4dd543c5aa8e024
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 14 13:53:56 2022 +0200

    tree-optimization/106938 - cleanup abnormal edges after inlining

    After inlining and IPA transforms we run fixup_cfg to fixup CFG
    effects in other functions.  But that fails to clean abnormal
    edges from non-pure/const calls which might no longer be necessary
    when ->calls_setjmp is false.  The following ensures this happens
    and refactors things so we call EH/abnormal cleanup only on the
    last stmt in a block.

            PR tree-optimization/106938
            * tree-cfg.cc (execute_fixup_cfg): Purge dead abnormal
            edges for all last stmts in a block.  Do EH cleanup
            only on the last stmt in a block.

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

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

* [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7
  2022-09-14  4:48 [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-09-14 12:51 ` cvs-commit at gcc dot gnu.org
@ 2022-09-14 12:51 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-14 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-09-14 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14  4:48 [Bug tree-optimization/106938] New: [13 Regression] ICE in predicate::init_from_control_deps asolokha at gmx dot com
2022-09-14  7:06 ` [Bug tree-optimization/106938] " rguenth at gcc dot gnu.org
2022-09-14  8:01 ` [Bug tree-optimization/106938] [13 Regression] ICE in predicate::init_from_control_deps since r13-2500-g0a4a2667dc115ca7 marxin at gcc dot gnu.org
2022-09-14 12:51 ` cvs-commit at gcc dot gnu.org
2022-09-14 12:51 ` 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).