public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/108547] New: ice in decompose, at wide-int.h:984 for -O2 with -Wall
@ 2023-01-25 18:28 dcb314 at hotmail dot com
  2023-01-25 18:40 ` [Bug tree-optimization/108547] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2023-01-25 18:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108547
           Summary: ice in decompose, at wide-int.h:984 for -O2 with -Wall
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

This legal C source code:

int li_4, li_5, us_8;
unsigned char func_7_ptr_13, func_7_uc_14;
void func_7_ptr_18() {
  if (li_5) {
    for (;;)
      ;
    short s_15;
    for (; func_7_uc_14;) {
      us_8 = 7;
      for (; us_8; us_8 += 1)
      lblD2AF1FAB:
        if (us_8)
          li_4 = 1;
      func_7_uc_14 += func_7_ptr_18;
      if (func_7_ptr_13 & 1 && (func_7_uc_14 &= func_7_ptr_13))
        s_15 %= func_7_uc_10li_19(s_15);
    }
  }
  goto lblD2AF1FAB;
}

when compiled with recent gcc trunk, does this:

$ ~/gcc/results//bin/gcc -c -O2 -Wall bug876.c 
bug876.c: In function ‘func_7_ptr_18’:
bug876.c:14:20: warning: assignment to ‘unsigned char’ from ‘void (*)()’ makes
integer from pointer without a cast [-Wint-conversion]
   14 |       func_7_uc_14 += func_7_ptr_18;
      |                    ^~
bug876.c:16:17: warning: implicit declaration of function ‘func_7_uc_10li_19’
[-Wimplicit-function-declaration]
   16 |         s_15 %= func_7_uc_10li_19(s_15);
      |                 ^~~~~~~~~~~~~~~~~
during GIMPLE pass: uninit
bug876.c:3:6: internal compiler error: in decompose, at wide-int.h:984
    3 | void func_7_ptr_18() {
      |      ^~~~~~~~~~~~~
0x1df0eb9 value_sat_pred_p(tree_node*, tree_node*, tree_code, bool)
        ../../trunk.d1/gcc/wide-int.h:0

The bug first seems to appear sometime before git hash g:9b111debbfb79a0a
dated 20221229.

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

end of thread, other threads:[~2023-01-26 12:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-25 18:28 [Bug c/108547] New: ice in decompose, at wide-int.h:984 for -O2 with -Wall dcb314 at hotmail dot com
2023-01-25 18:40 ` [Bug tree-optimization/108547] " pinskia at gcc dot gnu.org
2023-01-25 18:43 ` pinskia at gcc dot gnu.org
2023-01-25 18:46 ` pinskia at gcc dot gnu.org
2023-01-25 18:48 ` pinskia at gcc dot gnu.org
2023-01-25 19:49 ` [Bug tree-optimization/108547] [13 Regression] " pinskia at gcc dot gnu.org
2023-01-26  7:45 ` rguenth at gcc dot gnu.org
2023-01-26  9:45 ` [Bug tree-optimization/108547] [13 Regression] ice in decompose, at wide-int.h:984 for -O2 with -Wall since r13-2500-g0a4a2667dc115ca7 marxin at gcc dot gnu.org
2023-01-26 12:49 ` cvs-commit at gcc dot gnu.org
2023-01-26 12:50 ` 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).