public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
@ 2006-04-13 17:26 ` pinskia at gcc dot gnu dot org
2006-04-19 20:25 ` reichelt at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-13 17:26 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
@ 2006-04-13 17:26 pinskia at gcc dot gnu dot org
2006-04-13 17:26 ` [Bug c/27150] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-13 17:26 UTC (permalink / raw)
To: gcc-bugs
Testcase:
int g(int f)
{
return (&f)!=0;
}
-----
Just like PR 25861.
t.c:5: internal compiler error: tree check: expected tree that contains "decl
with visibility" structure, have "parm_decl" in build_binary_op, at
c-typeck.c:7987
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: [4.2 Regression] ICE with &parm_decl != 0 in
build_binary_op
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
2006-04-13 17:26 ` [Bug c/27150] " pinskia at gcc dot gnu dot org
@ 2006-04-19 20:25 ` reichelt at gcc dot gnu dot org
2006-04-24 0:38 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-04-19 20:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from reichelt at gcc dot gnu dot org 2006-04-19 20:25 -------
Confirmed.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |monitored
Last reconfirmed|0000-00-00 00:00:00 |2006-04-19 20:25:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
2006-04-13 17:26 ` [Bug c/27150] " pinskia at gcc dot gnu dot org
2006-04-19 20:25 ` reichelt at gcc dot gnu dot org
@ 2006-04-24 0:38 ` pinskia at gcc dot gnu dot org
2006-05-08 7:54 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-24 0:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-24 00:38 -------
Here is the fix:
Index: c-typeck.c
===================================================================
--- c-typeck.c (revision 113199)
+++ c-typeck.c (working copy)
@@ -7978,7 +7978,8 @@ build_binary_op (enum tree_code code, tr
{
if (TREE_CODE (op0) == ADDR_EXPR
&& DECL_P (TREE_OPERAND (op0, 0))
- && !DECL_WEAK (TREE_OPERAND (op0, 0)))
+ && (TREE_CODE (TREE_OPERAND(op0, 0)) == PARM_DECL
+ || !DECL_WEAK (TREE_OPERAND (op0, 0))))
warning (OPT_Walways_true, "the address of %qD will never be NULL",
TREE_OPERAND (op0, 0));
result_type = type0;
@@ -7987,7 +7988,8 @@ build_binary_op (enum tree_code code, tr
{
if (TREE_CODE (op1) == ADDR_EXPR
&& DECL_P (TREE_OPERAND (op1, 0))
- && !DECL_WEAK (TREE_OPERAND (op1, 0)))
+ && (TREE_CODE (TREE_OPERAND(op1, 0)) == PARM_DECL
+ || !DECL_WEAK (TREE_OPERAND (op1, 0))))
warning (OPT_Walways_true, "the address of %qD will never be NULL",
TREE_OPERAND (op1, 0));
result_type = type1;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-04-24 0:38 ` pinskia at gcc dot gnu dot org
@ 2006-05-08 7:54 ` pinskia at gcc dot gnu dot org
2006-06-04 18:25 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-08 7:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-05-08 07:54 -------
Mine.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-05-08 7:54 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 18:25 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:31 ` sayle at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 18:25 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-06-04 18:25 ` mmitchel at gcc dot gnu dot org
@ 2006-06-05 2:31 ` sayle at gcc dot gnu dot org
2006-06-05 2:47 ` sayle at gcc dot gnu dot org
2006-06-05 4:49 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-06-05 2:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sayle at gcc dot gnu dot org 2006-06-05 02:28 -------
Subject: Bug 27150
Author: sayle
Date: Mon Jun 5 02:28:20 2006
New Revision: 114380
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114380
Log:
PR middle-end/27382
* c-common.c (c_common_truthvalue_conversion): Explicitly check
for LABEL_DECL before calling DECL_WEAK.
PR c/27150
* c-typeck.c (build_binary_op): Likewise, explicitly check for
LABEL_DECL and PARM_DECL.
* gcc.dg/pr27150-1.c: New testcase.
* gcc.dg/pr27382-1.c: New testcase.
* gcc.dg/pr27382-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/pr27150-1.c
trunk/gcc/testsuite/gcc.dg/pr27382-1.c
trunk/gcc/testsuite/gcc.dg/pr27382-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-typeck.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-06-05 2:31 ` sayle at gcc dot gnu dot org
@ 2006-06-05 2:47 ` sayle at gcc dot gnu dot org
2006-06-05 4:49 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-06-05 2:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sayle at gcc dot gnu dot org 2006-06-05 02:31 -------
Subject: Bug 27150
Author: sayle
Date: Mon Jun 5 02:31:41 2006
New Revision: 114381
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114381
Log:
PR middle-end/27382
PR c/27150
* gcc.dg/pr27150-1.c: New testcase.
* gcc.dg/pr27382-1.c: New testcase.
* gcc.dg/pr27382-2.c: New testcase.
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/27150] [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-06-05 2:47 ` sayle at gcc dot gnu dot org
@ 2006-06-05 4:49 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-05 4:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-06-05 03:08 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27150
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-06-05 3:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-13 17:26 [Bug c/27150] New: [4.2 Regression] ICE with &parm_decl != 0 in build_binary_op pinskia at gcc dot gnu dot org
2006-04-13 17:26 ` [Bug c/27150] " pinskia at gcc dot gnu dot org
2006-04-19 20:25 ` reichelt at gcc dot gnu dot org
2006-04-24 0:38 ` pinskia at gcc dot gnu dot org
2006-05-08 7:54 ` pinskia at gcc dot gnu dot org
2006-06-04 18:25 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:31 ` sayle at gcc dot gnu dot org
2006-06-05 2:47 ` sayle at gcc dot gnu dot org
2006-06-05 4:49 ` pinskia at gcc dot gnu dot 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).