public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872
@ 2020-11-23 16:38 gscfq@t-online.de
2020-11-23 18:24 ` [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e marxin at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2020-11-23 16:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
Bug ID: 97956
Summary: [11 Regression] ICE in build2, at tree.c:4872
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Changed between 20200823 and 20201004, derived from memchr.c :
$ cat z1.c
typedef __INT8_TYPE__ int8_t;
typedef __INT32_TYPE__ int32_t;
extern void* memchr (const void*, int, long);
struct SX
{
int32_t n;
int8_t a[];
};
const struct SX sx = { 0x1221 };
const char sx_rep[] = { };
void test_find (void)
{
int n = 0, nb = (const char*)&sx.a - (const char*)&sx;
const char *p = (const char*)&sx, *q = sx_rep;
n += p + 1 == memchr (p, q[1], nb);
}
$ gcc-11-20201122 -c z1.c
$
$ gcc-11-20201122 -c z1.c -O2
during GIMPLE pass: forwprop
z1.c: In function 'test_find':
z1.c:16:1: internal compiler error: in build2, at tree.c:4872
16 | }
| ^
0xdaae9e build2(tree_code, tree_node*, tree_node*, tree_node*)
../../gcc/tree.c:4871
0x880b9f build2_loc
../../gcc/tree.h:4371
0x880b9f fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
../../gcc/fold-const.c:13318
0xc3ad53 forward_propagate_into_comparison_1
../../gcc/tree-ssa-forwprop.c:434
0xc41900 forward_propagate_into_comparison
../../gcc/tree-ssa-forwprop.c:491
0xc41900 execute
../../gcc/tree-ssa-forwprop.c:3145
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
@ 2020-11-23 18:24 ` marxin at gcc dot gnu.org
2020-11-24 20:23 ` msebor at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-23 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |10.2.0
Summary|[11 Regression] ICE in |[11 Regression] ICE in
|build2, at tree.c:4872 |build2, at tree.c:4872
| |since
| |r11-2709-g866626efd749ed3e
Known to fail| |11.0
Ever confirmed|0 |1
Priority|P3 |P1
Last reconfirmed| |2020-11-23
CC| |marxin at gcc dot gnu.org,
| |msebor at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
Target Milestone|--- |11.0
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-2709-g866626efd749ed3e.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
2020-11-23 18:24 ` [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e marxin at gcc dot gnu.org
@ 2020-11-24 20:23 ` msebor at gcc dot gnu.org
2020-11-25 0:46 ` msebor at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-11-24 20:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
2020-11-23 18:24 ` [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e marxin at gcc dot gnu.org
2020-11-24 20:23 ` msebor at gcc dot gnu.org
@ 2020-11-25 0:46 ` msebor at gcc dot gnu.org
2020-11-25 18:02 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-11-25 0:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-November/560127.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
` (2 preceding siblings ...)
2020-11-25 0:46 ` msebor at gcc dot gnu.org
@ 2020-11-25 18:02 ` cvs-commit at gcc dot gnu.org
2020-11-25 18:04 ` msebor at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-25 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:aec2d6849160f92cd45f97d6c3bdd8808ab01fa6
commit r11-5382-gaec2d6849160f92cd45f97d6c3bdd8808ab01fa6
Author: Martin Sebor <msebor@redhat.com>
Date: Wed Nov 25 11:00:10 2020 -0700
PR middle-end/97956 - ICE due to type mismatch in pointer_plus_expr during
memchr folding
gcc/ChangeLog:
PR middle-end/97956
* gimple-fold.c (gimple_fold_builtin_memchr): Use sizetype for
pointer
offsets.
gcc/testsuite/ChangeLog:
PR middle-end/97956
* gcc.dg/memchr-3.c: New test.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
` (3 preceding siblings ...)
2020-11-25 18:02 ` cvs-commit at gcc dot gnu.org
@ 2020-11-25 18:04 ` msebor at gcc dot gnu.org
2023-02-28 17:09 ` redi at gcc dot gnu.org
2023-03-02 13:42 ` cvs-commit at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-11-25 18:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Committed in r11-5382.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
` (4 preceding siblings ...)
2020-11-25 18:04 ` msebor at gcc dot gnu.org
@ 2023-02-28 17:09 ` redi at gcc dot gnu.org
2023-03-02 13:42 ` cvs-commit at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2023-02-28 17:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to G. Steinmetz from comment #0)
> typedef __INT8_TYPE__ int8_t;
> typedef __INT32_TYPE__ int32_t;
> extern void* memchr (const void*, int, long);
For the record, the signature above is wrong (the third parameter should be
size_t not long), and that's what caused the ICE.
(So I think this should really be ice-on-invalid-code since it has a bad
declaration of memchr).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
` (5 preceding siblings ...)
2023-02-28 17:09 ` redi at gcc dot gnu.org
@ 2023-03-02 13:42 ` cvs-commit at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-02 13:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97956
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Yong <jyong@gcc.gnu.org>:
https://gcc.gnu.org/g:62a8d31ecc07041af4a81353c2d57d9845c4b771
commit r13-6414-g62a8d31ecc07041af4a81353c2d57d9845c4b771
Author: Jonathan Yong <10walls@gmail.com>
Date: Mon Feb 27 10:02:32 2023 +0000
gcc.dg/memchr-3.c: Account for LLP64 warnings
gcc/testsuite/ChangeLog:
PR middle-end/97956
* gcc.dg/memchr-3.c (memchr): Account for LLP64 warnings.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-02 13:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 16:38 [Bug c/97956] New: [11 Regression] ICE in build2, at tree.c:4872 gscfq@t-online.de
2020-11-23 18:24 ` [Bug tree-optimization/97956] [11 Regression] ICE in build2, at tree.c:4872 since r11-2709-g866626efd749ed3e marxin at gcc dot gnu.org
2020-11-24 20:23 ` msebor at gcc dot gnu.org
2020-11-25 0:46 ` msebor at gcc dot gnu.org
2020-11-25 18:02 ` cvs-commit at gcc dot gnu.org
2020-11-25 18:04 ` msebor at gcc dot gnu.org
2023-02-28 17:09 ` redi at gcc dot gnu.org
2023-03-02 13:42 ` 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).