public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cnsun at uwaterloo dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/100843] New: ICE with -O1: in try_store_by_multiple_pieces, at builtins.c:6739
Date: Tue, 01 Jun 2021 04:04:16 +0000	[thread overview]
Message-ID: <bug-100843-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 100843
           Summary: ICE with -O1: in try_store_by_multiple_pieces, at
                    builtins.c:6739
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210601 (experimental) [master revision
:54832e2f6:28daadc98094501175c9dfe4a985871fa6aa4f94] (GCC)

$ cat mutant.c
char c;
void *memset();
test_integer_conversion_memset(void *d) { memset(d, '\0', c); }

$ gcc-trunk -O1 mutant.c
mutant.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); }
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mutant.c: In function ‘test_integer_conversion_memset’:
mutant.c:3:59: warning: ‘memset’ argument 3 promotes to ‘int’ where ‘long
unsigned int’ is expected in a call to built-in function declared without
prototype [-Wbuiltin-declaration-mismatch]
    3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); }
      |                                                           ^
mutant.c:2:7: note: built-in ‘memset’ declared here
    2 | void *memset();
      |       ^~~~~~
during RTL pass: expand
mutant.c:3:43: internal compiler error: in try_store_by_multiple_pieces, at
builtins.c:6739
    3 | test_integer_conversion_memset(void *d) { memset(d, '\0', c); }
      |                                           ^~~~~~~~~~~~~~~~~~
0x681394 try_store_by_multiple_pieces(rtx_def*, rtx_def*, unsigned int,
unsigned long, unsigned long, rtx_def*, char, unsigned int)
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6739
0xb720bd clear_storage_hints(rtx_def*, rtx_def*, block_op_methods, unsigned
int, long, unsigned long, unsigned long, unsigned long, unsigned int)
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.c:3201
0xa099a2 expand_builtin_memset_args
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6969
0xa1bbfe expand_builtin_memset
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:6685
0xa1bbfe expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/builtins.c:10187
0xb6be8c expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.c:11429
0xa45f49 expand_expr
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/expr.h:301
0xa45f49 expand_call_stmt
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:2846
0xa45f49 expand_gimple_stmt_1
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:3850
0xa45f49 expand_gimple_stmt
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:4014
0xa4b8a9 expand_gimple_basic_block
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:6056
0xa4d77f execute
        /tmp/tmp.4wFFqTQrHF-gcc-builder/gcc/gcc/cfgexpand.c:6782
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

             reply	other threads:[~2021-06-01  4:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  4:04 cnsun at uwaterloo dot ca [this message]
2021-06-01  6:33 ` [Bug middle-end/100843] [12 Regression] " rguenth at gcc dot gnu.org
2021-06-01  7:14 ` [Bug middle-end/100843] [12 Regression] ICE with -O1: in try_store_by_multiple_pieces, at builtins.c:6739 since r12-397-gda9e6e63d1ae22e530ec7baf59f6ed028bf05776 marxin at gcc dot gnu.org
2021-11-19 13:13 ` aoliva at gcc dot gnu.org
2021-12-09  5:07 ` aoliva at gcc dot gnu.org
2021-12-15  5:25 ` cvs-commit at gcc dot gnu.org
2021-12-15  5:27 ` aoliva at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100843-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).