public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2007-07-17 18:00 bunk at stusta dot de
  2007-07-17 18:05 ` [Bug c/32796] [4.3 Regression] " bunk at stusta dot de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: bunk at stusta dot de @ 2007-07-17 18:00 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

$ /usr/local/DIR/gcc-svn20070717/bin/gcc -Wp,-MD,drivers/kvm/.mmu.o.d 
-nostdinc -isystem
/usr/local/DIR/gcc-svn20070717/lib/gcc/i686-pc-linux-gnu/4.3.0/include
-D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -O1 -pipe -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2  -march=athlon -ffreestanding
-maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1
-Iinclude/asm-i386/mach-generic -Iinclude/asm-i386/mach-default
-fno-omit-frame-pointer -fno-optimize-sibling-calls
-fasynchronous-unwind-tables  -fno-stack-protector
-Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(mmu)"  -D"KBUILD_MODNAME=KBUILD_STR(kvm)" -c -o
drivers/kvm/mmu.o drivers/kvm/mmu.c
drivers/kvm/mmu.c: In function ‘nonpaging_map’:
drivers/kvm/mmu.c:831: 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, at tree.c:6198
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: 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
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bunk at stusta dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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
@ 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

end of thread, other threads:[~2007-08-09 21:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
2007-08-09 21:39 ` pinskia at gcc dot gnu dot org
2007-08-09 21:40 ` 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).