* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
@ 2007-07-17 18:05 ` bunk at stusta dot de
2007-07-17 18:29 ` [Bug tree-optimization/32796] " belyshev at depni dot sinp dot msu dot ru
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: bunk at stusta dot de @ 2007-07-17 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bunk at stusta dot de 2007-07-17 18:05 -------
Created an attachment (id=13933)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13933&action=view)
preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
2007-07-17 18:05 ` [Bug c/32796] [4.3 Regression] " bunk at stusta dot de
@ 2007-07-17 18:29 ` belyshev at depni dot sinp dot msu dot ru
2007-07-17 20:34 ` belyshev at depni dot sinp dot msu dot ru
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2007-07-17 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from belyshev at depni dot sinp dot msu dot ru 2007-07-17 18:29 -------
Confirmed, reduced testcase (compile with -O1):
unsigned long f (void *ptr)
{
return ((unsigned long)(ptr)-1) | 1ULL;
}
--
belyshev at depni dot sinp dot msu dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |belyshev at depni dot sinp
| |dot msu dot ru
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
Ever Confirmed|0 |1
GCC build triplet|i686-pc-linux-gnu |
GCC host triplet|i686-pc-linux-gnu |
Last reconfirmed|0000-00-00 00:00:00 |2007-07-17 18:29:41
date| |
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug tree-optimization/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
2007-07-17 18:05 ` [Bug c/32796] [4.3 Regression] " bunk at stusta dot de
2007-07-17 18:29 ` [Bug tree-optimization/32796] " belyshev at depni dot sinp dot msu dot ru
@ 2007-07-17 20:34 ` belyshev at depni dot sinp dot msu dot ru
2007-07-17 21:05 ` [Bug c/32796] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2007-07-17 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from belyshev at depni dot sinp dot msu dot ru 2007-07-17 20:34 -------
Fails since pointer-plus merge:
r125755 | pinskia | 2007-06-16 09:42:36 +0400 (Sat, 16 Jun 2007) | 386 lines
--
belyshev at depni dot sinp dot msu dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Keywords| |ice-checking, ice-on-valid-
| |code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (2 preceding siblings ...)
2007-07-17 20:34 ` belyshev at depni dot sinp dot msu dot ru
@ 2007-07-17 21:05 ` pinskia at gcc dot gnu dot org
2007-07-18 14:16 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-17 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-07-17 21:05 -------
Actually this is a front-end issue:
#2 0x0034dce8 in int_fits_type_p (c=0x436812d0, type=0x4361f460) at
../../gcc/tree.c:6198
#3 0x0007a950 in build_binary_op (code=BIT_IOR_EXPR, orig_op0=0x436c5000,
orig_op1=0x436812d0, convert_p=1) at ../../gcc/c-typeck.c:8245
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (3 preceding siblings ...)
2007-07-17 21:05 ` [Bug c/32796] " pinskia at gcc dot gnu dot org
@ 2007-07-18 14:16 ` pinskia at gcc dot gnu dot org
2007-08-04 11:54 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-18 14:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2007-07-18 14:16 -------
Patch which needs testing:
Index: c-typeck.c
===================================================================
--- c-typeck.c (revision 126719)
+++ c-typeck.c (working copy)
@@ -8218,8 +8239,9 @@
< TYPE_PRECISION (result_type))
&& (type
= c_common_signed_or_unsigned_type (unsigned1,
- TREE_TYPE (arg1)),
- int_fits_type_p (arg0, type)))
+ TREE_TYPE (arg1)))
+ && !POINTER_TYPE_P (type)
+ && int_fits_type_p (arg0, type))
result_type = type;
else if (TREE_CODE (arg1) == INTEGER_CST
&& (unsigned0 || !uns)
@@ -8227,8 +8249,9 @@
< TYPE_PRECISION (result_type))
&& (type
= c_common_signed_or_unsigned_type (unsigned0,
- TREE_TYPE (arg0)),
- int_fits_type_p (arg1, type)))
+ TREE_TYPE (arg0)))
+ && !POINTER_TYPE_P (type)
+ && int_fits_type_p (arg0, type))
result_type = type;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (4 preceding siblings ...)
2007-07-18 14:16 ` pinskia at gcc dot gnu dot org
@ 2007-08-04 11:54 ` pinskia at gcc dot gnu dot org
2007-08-06 3:47 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-04 11:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-08-04 11: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=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (5 preceding siblings ...)
2007-08-04 11:54 ` pinskia at gcc dot gnu dot org
@ 2007-08-06 3:47 ` pinskia at gcc dot gnu dot org
2007-08-09 21:39 ` pinskia at gcc dot gnu dot org
2007-08-09 21:40 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-06 3:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2007-08-06 03:47 -------
Testing this patch right now (a fixed up version really, there is a typo, the
last arg0 should be arg1).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (6 preceding siblings ...)
2007-08-06 3:47 ` pinskia at gcc dot gnu dot org
@ 2007-08-09 21:39 ` pinskia at gcc dot gnu dot org
2007-08-09 21:40 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-09 21:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from pinskia at gcc dot gnu dot org 2007-08-09 21:39 -------
Subject: Bug 32796
Author: pinskia
Date: Thu Aug 9 21:39:08 2007
New Revision: 127323
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127323
Log:
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/32796
* c-typeck.c (build_binary_op): Check for non pointer types before
calling int_fits_type_p.
2007-08-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c/32796
* gcc.c-torture/compile/pr32796.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr32796.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32796
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/32796] [4.3 Regression] internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p
2007-07-17 18:00 [Bug c/32796] New: internal compiler error: tree check: expected integer_type or enumeral_type or boolean_type or real_type, have pointer_type in int_fits_type_p bunk at stusta dot de
` (7 preceding siblings ...)
2007-08-09 21:39 ` pinskia at gcc dot gnu dot org
@ 2007-08-09 21:40 ` pinskia at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-09 21:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2007-08-09 21:40 -------
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=32796
^ permalink raw reply [flat|nested] 10+ messages in thread