public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
@ 2020-07-27 14:05 jakub at gcc dot gnu.org
2020-07-27 14:06 ` [Bug middle-end/96335] " jakub at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-07-27 14:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
Bug ID: 96335
Summary: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since
r10-4929
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
Since r10-4929-g54aa6b58fe2fe73bbe67e0485777e0c410a18673 the following testcase
ICEs with -O2 (seen as ICE on dmraid on s390x-linux) on all targets.
void bar (int, void *) __attribute__((__access__(__read_only__, 2)));
void
foo (void *x)
{
void (*fn) () = bar;
fn (0, x);
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
@ 2020-07-27 14:06 ` jakub at gcc dot gnu.org
2020-07-27 14:18 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-07-27 14:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.3
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Last reconfirmed| |2020-07-27
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Priority|P3 |P2
Keywords| |ice-on-valid-code
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
2020-07-27 14:06 ` [Bug middle-end/96335] " jakub at gcc dot gnu.org
@ 2020-07-27 14:18 ` jakub at gcc dot gnu.org
2020-07-28 9:09 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-07-27 14:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48933
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48933&action=edit
gcc11-pr96335.patch
Untested fix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
2020-07-27 14:06 ` [Bug middle-end/96335] " jakub at gcc dot gnu.org
2020-07-27 14:18 ` jakub at gcc dot gnu.org
@ 2020-07-28 9:09 ` cvs-commit at gcc dot gnu.org
2020-07-28 9:13 ` cvs-commit at gcc dot gnu.org
2020-07-28 13:46 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-28 9:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:f9264b9008386ac3b5c795472c222fa524b127b0
commit r11-2379-gf9264b9008386ac3b5c795472c222fa524b127b0
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jul 28 11:08:29 2020 +0200
expander: Fix ICE in maybe_warn_rdwr_sizes [PR96335]
The following testcase ICEs in maybe_warn_rdwr_sizes. The problem is that
the caller uses its fndecl and fntype variables to fill up rdwr_map, and
the fntype in that case is a prototype with the access attribute and all
the checks needed for that performed. But the maybe_warn_rdwr_sizes
function tries to rediscover fndecl/fntype itself and does it differently
from how the caller did (for fndecl get_callee_fndecl and fntype from that
FUNCTION_DECL, otherwise sets fntype to CALL_EXPR_FN's type).
On the testcase, get_callee_fndecl does find a FUNCTION_DECL because
it does STRIP_NOPS in between.
Instead of trying to rediscover those, this patch just passes them down,
like is done in several other functions.
2020-07-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/96335
* calls.c (maybe_warn_rdwr_sizes): Add FNDECL and FNTYPE arguments,
instead of trying to rediscover them in the body.
(initialize_argument_information): Adjust caller.
* gcc.dg/pr96335.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2020-07-28 9:09 ` cvs-commit at gcc dot gnu.org
@ 2020-07-28 9:13 ` cvs-commit at gcc dot gnu.org
2020-07-28 13:46 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-28 9:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:7d88f924ad8d773cceb08e123cb2831f20d40cb4
commit r10-8541-g7d88f924ad8d773cceb08e123cb2831f20d40cb4
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Jul 28 11:08:29 2020 +0200
expander: Fix ICE in maybe_warn_rdwr_sizes [PR96335]
The following testcase ICEs in maybe_warn_rdwr_sizes. The problem is that
the caller uses its fndecl and fntype variables to fill up rdwr_map, and
the fntype in that case is a prototype with the access attribute and all
the checks needed for that performed. But the maybe_warn_rdwr_sizes
function tries to rediscover fndecl/fntype itself and does it differently
from how the caller did (for fndecl get_callee_fndecl and fntype from that
FUNCTION_DECL, otherwise sets fntype to CALL_EXPR_FN's type).
On the testcase, get_callee_fndecl does find a FUNCTION_DECL because
it does STRIP_NOPS in between.
Instead of trying to rediscover those, this patch just passes them down,
like is done in several other functions.
2020-07-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/96335
* calls.c (maybe_warn_rdwr_sizes): Add FNDECL and FNTYPE arguments,
instead of trying to rediscover them in the body.
(initialize_argument_information): Adjust caller.
* gcc.dg/pr96335.c: New test.
(cherry picked from commit f9264b9008386ac3b5c795472c222fa524b127b0)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/96335] [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2020-07-28 9:13 ` cvs-commit at gcc dot gnu.org
@ 2020-07-28 13:46 ` jakub at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-07-28 13:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96335
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for 10.3 and later.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-28 13:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 14:05 [Bug middle-end/96335] New: [10/11 Regression] ICE in maybe_warn_rdwr_sizes since r10-4929 jakub at gcc dot gnu.org
2020-07-27 14:06 ` [Bug middle-end/96335] " jakub at gcc dot gnu.org
2020-07-27 14:18 ` jakub at gcc dot gnu.org
2020-07-28 9:09 ` cvs-commit at gcc dot gnu.org
2020-07-28 9:13 ` cvs-commit at gcc dot gnu.org
2020-07-28 13:46 ` jakub 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).