public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112845] New: ICE: in extract_insn, at recog.cc:2804 with -Os -fcf-protection -c
@ 2023-12-04 14:04 iamanonymous.cs at gmail dot com
  2023-12-04 15:35 ` [Bug target/112845] [11/12/13/14 Regression] ICE: in extract_insn, at recog.cc:2804 with -Os -fcf-protection -c since r8-3504 jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2023-12-04 14:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112845
           Summary: ICE: in extract_insn, at recog.cc:2804 with -Os
                    -fcf-protection -c
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---

*******************************************************************************
OS and Platform:
$ uname -a:
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/root/gcc_set/202311291030/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc_set/202311291030/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/root/gcc_set/202311291030
--with-gmp=/root/build_essential --with-mpfr=/root/build_essential
--with-mpc=/root/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leak
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231129 (experimental) (GCC) 

git version: 99fa0bfd63d97825c4221dcd3123940f1d0e6291
*******************************************************************************
Program:
$ cat mutant.c
#ifdef __x86_64__
#define ENDBR_IMMEDIATE 0xfa1e0ff3
#else
#define ENDBR_IMMEDIATE 0xfb1e0ff3
#endif

int
func (int* p)
{
  return *(p + ENDBR_IMMEDIATE);
}

*******************************************************************************
Command Lines:
$ gcc -Os -fcf-protection -c mutant.c
mutant.c: In function ‘func’:
mutant.c:11:1: error: unrecognizable insn:
   11 | }
      | ^
(insn 27 7 28 2 (set (reg:DI 0 ax [101])
        (const_int 4196274163 [0xfa1e0ff3])) "mutant.c":10:10 discrim 1 -1
     (nil))
during RTL pass: cprop_hardreg
mutant.c:11:1: internal compiler error: in extract_insn, at recog.cc:2804
0x7e504e _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/gcc/rtl-error.cc:108
0x7e506a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/gcc/rtl-error.cc:116
0x7e3572 extract_insn(rtx_insn*)
        ../../gcc/gcc/recog.cc:2804
0xf7209b extract_constrain_insn(rtx_insn*)
        ../../gcc/gcc/recog.cc:2703
0xf7b182 copyprop_hardreg_forward_1
        ../../gcc/gcc/regcprop.cc:836
0xf7c389 execute
        ../../gcc/gcc/regcprop.cc:1423
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Also ICE on trunk, compiler explorer: https://godbolt.org/z/d3x5sbG7W

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

end of thread, other threads:[~2023-12-17 13:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 14:04 [Bug target/112845] New: ICE: in extract_insn, at recog.cc:2804 with -Os -fcf-protection -c iamanonymous.cs at gmail dot com
2023-12-04 15:35 ` [Bug target/112845] [11/12/13/14 Regression] ICE: in extract_insn, at recog.cc:2804 with -Os -fcf-protection -c since r8-3504 jakub at gcc dot gnu.org
2023-12-04 15:38 ` jakub at gcc dot gnu.org
2023-12-04 15:38 ` jakub at gcc dot gnu.org
2023-12-05 12:18 ` cvs-commit at gcc dot gnu.org
2023-12-05 12:19 ` [Bug target/112845] [11/12/13 " jakub at gcc dot gnu.org
2023-12-05 16:33 ` cvs-commit at gcc dot gnu.org
2023-12-05 17:02 ` [Bug target/112845] [11/12 " jakub at gcc dot gnu.org
2023-12-16  0:38 ` cvs-commit at gcc dot gnu.org
2023-12-17 13:55 ` cvs-commit 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).