public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/98204] New: ICE in pointer_diff, at c/c-typeck.c:3954
@ 2020-12-08 17:38 gscfq@t-online.de
2020-12-08 19:55 ` [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372 marxin at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gscfq@t-online.de @ 2020-12-08 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98204
Bug ID: 98204
Summary: ICE in pointer_diff, at c/c-typeck.c:3954
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: ---
Following options produce an ICE for a bunch of testsuite files,
e.g. with file 920928-1.c (down to version r8) :
$ cat 920928-1.c
struct{int c;}v;
static long i=((char*)&(v.c)-(char*)&v);
$ gcc-11-20201206 -c 920928-1.c -fsanitize=address -fsanitize=pointer-subtract
920928-1.c:2:1: internal compiler error: in pointer_diff, at c/c-typeck.c:3954
2 | static long i=((char*)&(v.c)-(char*)&v);
| ^~~~~~
0x65f8d2 pointer_diff
../../gcc/c/c-typeck.c:3954
0x65f8d2 build_binary_op(unsigned int, tree_code, tree_node*, tree_node*, bool)
../../gcc/c/c-typeck.c:11750
0x660364 parser_build_binary_op(unsigned int, tree_code, c_expr, c_expr)
../../gcc/c/c-typeck.c:3759
0x677460 c_parser_binary_expression
../../gcc/c/c-parser.c:8005
0x6780b5 c_parser_conditional_expression
../../gcc/c/c-parser.c:7598
0x678611 c_parser_expr_no_commas
../../gcc/c/c-parser.c:7513
0x678882 c_parser_expression
../../gcc/c/c-parser.c:10606
0x66c1cc c_parser_postfix_expression
../../gcc/c/c-parser.c:9092
0x675dc2 c_parser_unary_expression
../../gcc/c/c-parser.c:8230
0x676def c_parser_cast_expression
../../gcc/c/c-parser.c:8072
0x6770a9 c_parser_binary_expression
../../gcc/c/c-parser.c:7875
0x6780b5 c_parser_conditional_expression
../../gcc/c/c-parser.c:7598
0x678611 c_parser_expr_no_commas
../../gcc/c/c-parser.c:7513
0x67ea29 c_parser_initializer
../../gcc/c/c-parser.c:5206
0x68c98a c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:2276
0x693fd7 c_parser_external_declaration
../../gcc/c/c-parser.c:1777
0x694af9 c_parser_translation_unit
../../gcc/c/c-parser.c:1650
0x694af9 c_parse_file()
../../gcc/c/c-parser.c:21877
0x6e4782 c_common_parse_file()
../../gcc/c-family/c-opts.c:1211
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372
2020-12-08 17:38 [Bug c/98204] New: ICE in pointer_diff, at c/c-typeck.c:3954 gscfq@t-online.de
@ 2020-12-08 19:55 ` marxin at gcc dot gnu.org
2020-12-14 9:49 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:55 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-08 19:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98204
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Summary|ICE in pointer_diff, at |ICE in pointer_diff, at
|c/c-typeck.c:3954 |c/c-typeck.c:3954 since
| |r8-5108-g05abad4cca62d372
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Last reconfirmed| |2020-12-08
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r8-5108-g05abad4cca62d372.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372
2020-12-08 17:38 [Bug c/98204] New: ICE in pointer_diff, at c/c-typeck.c:3954 gscfq@t-online.de
2020-12-08 19:55 ` [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372 marxin at gcc dot gnu.org
@ 2020-12-14 9:49 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:55 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-14 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98204
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:ab28eac607637a641fbec27c5f6bbe9b6197c80f
commit r11-5985-gab28eac607637a641fbec27c5f6bbe9b6197c80f
Author: Martin Liska <mliska@suse.cz>
Date: Wed Dec 9 16:21:18 2020 +0100
sanitizer: do not ICE for pointer cmp/sub
gcc/c/ChangeLog:
PR sanitizer/98204
* c-typeck.c (pointer_diff): Do not emit a top-level
sanitization.
(build_binary_op): Likewise.
gcc/testsuite/ChangeLog:
PR sanitizer/98204
* c-c++-common/asan/pr98204.c: New test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372
2020-12-08 17:38 [Bug c/98204] New: ICE in pointer_diff, at c/c-typeck.c:3954 gscfq@t-online.de
2020-12-08 19:55 ` [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372 marxin at gcc dot gnu.org
2020-12-14 9:49 ` cvs-commit at gcc dot gnu.org
@ 2020-12-14 9:55 ` marxin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-14 9:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98204
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on the master, not planning to backport.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-14 9:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 17:38 [Bug c/98204] New: ICE in pointer_diff, at c/c-typeck.c:3954 gscfq@t-online.de
2020-12-08 19:55 ` [Bug sanitizer/98204] ICE in pointer_diff, at c/c-typeck.c:3954 since r8-5108-g05abad4cca62d372 marxin at gcc dot gnu.org
2020-12-14 9:49 ` cvs-commit at gcc dot gnu.org
2020-12-14 9:55 ` marxin 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).