public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion
@ 2012-02-29 22:11 gjl at gcc dot gnu.org
  2012-02-29 22:12 ` [Bug other/52443] " gjl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-02-29 22:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

             Bug #: 52443
           Summary: ICE: verify_gimple failed: invalid types in nop
                    conversion
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: addr-space, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
            Target: avr


extern void bar (const __memx void*);

void func (char a)
{
    bar (a);
}

const __memx void* func2 (char a)
{
    return a;
}

>> avr-gcc ice-memx.c -S -w

ice-memx.c: In function 'func2':
ice-memx.c:8:20: error: invalid types in nop conversion
const <address-space-7> void *
long int
D.1326 = (const <address-space-7> void *) D.1327;

ice-memx.c:8:20: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.


Target: avr
Configured with: ../gcc-trunk/configure --with-gmp=/usr/local
--prefix=/usr/local/avr --target=avr --enable-languages=c,c++ --with-dwarf2
--disable-shared --disable-libada --disable-libssp --disable-nls
Thread model: single
gcc version 4.7.0 20120217 (experimental) (GCC) 
GNU C (GCC) version 4.7.0 20120217 (experimental) (avr)
    compiled by GNU C version 4.6.2, GMP version 5.0.4, MPFR version 3.1.0, MPC
version 0.9


I can also see the error on a build from 2012-02-28.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
@ 2012-02-29 22:12 ` gjl at gcc dot gnu.org
  2012-02-29 22:19 ` gjl at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-02-29 22:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-02-29 22:11:16 UTC ---
Created attachment 26793
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26793
ice-memx.c: C source


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
  2012-02-29 22:12 ` [Bug other/52443] " gjl at gcc dot gnu.org
@ 2012-02-29 22:19 ` gjl at gcc dot gnu.org
  2012-03-01  9:51 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-02-29 22:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-29
                 CC|                            |eric.weddington at atmel
                   |                            |dot com
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
  2012-02-29 22:12 ` [Bug other/52443] " gjl at gcc dot gnu.org
  2012-02-29 22:19 ` gjl at gcc dot gnu.org
@ 2012-03-01  9:51 ` rguenth at gcc dot gnu.org
  2012-03-01 10:20 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01  9:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 09:50:40 UTC ---
        /* Allow conversions between integral types and pointers only if
           there is no sign or zero extension involved.
           For targets were the precision of ptrofftype doesn't match that
           of pointers we need to allow arbitrary conversions from and
           to ptrofftype.  */
        if ((POINTER_TYPE_P (lhs_type)
             && INTEGRAL_TYPE_P (rhs1_type)
             && (TYPE_PRECISION (lhs_type) >= TYPE_PRECISION (rhs1_type)
                 || ptrofftype_p (rhs1_type)))
            || (POINTER_TYPE_P (rhs1_type)
                && INTEGRAL_TYPE_P (lhs_type)
                && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
                    || ptrofftype_p (sizetype))))
          return false;

Looks like the above should be

        if ((POINTER_TYPE_P (lhs_type)
             && INTEGRAL_TYPE_P (rhs1_type)
             && (TYPE_PRECISION (lhs_type) <= TYPE_PRECISION (rhs1_type)
                 || ptrofftype_p (rhs1_type)))
            || (POINTER_TYPE_P (rhs1_type)
                && INTEGRAL_TYPE_P (lhs_type)
                && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
                    || ptrofftype_p (sizetype))))
          return false;

does that help?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-03-01  9:51 ` rguenth at gcc dot gnu.org
@ 2012-03-01 10:20 ` rguenth at gcc dot gnu.org
  2012-03-01 10:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01 10:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 10:20:20 UTC ---
Or rather

        /* Allow conversions pointer type to integral type only if
           there is no sign or zero extension involved.
           For targets were the precision of ptrofftype doesn't match that
           of pointers we need to allow arbitrary conversions to ptrofftype. 
*/
        if (POINTER_TYPE_P (rhs1_type)
            && INTEGRAL_TYPE_P (lhs_type)
            && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
                || ptrofftype_p (sizetype)))
          return false;

as restricting conversion from integral to pointers does not seem necessary
(only pointers do not have a "sign").


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-03-01 10:20 ` rguenth at gcc dot gnu.org
@ 2012-03-01 10:24 ` rguenth at gcc dot gnu.org
  2012-03-01 10:25 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01 10:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 10:23:34 UTC ---
Err ...

        /* Allow conversions pointer type to integral type only if
           there is no sign or zero extension involved.
           For targets were the precision of ptrofftype doesn't match that
           of pointers we need to allow arbitrary conversions to ptrofftype. 
*/
        if ((POINTER_TYPE_P (lhs_type)
             && INTEGRAL_TYPE_P (rhs1_type))
            || (POINTER_TYPE_P (rhs1_type)
                && INTEGRAL_TYPE_P (lhs_type)
                && (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
                    || ptrofftype_p (sizetype))))
          return false;

tricky business ;)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-03-01 10:24 ` rguenth at gcc dot gnu.org
@ 2012-03-01 10:25 ` rguenth at gcc dot gnu.org
  2012-03-01 12:26 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01 10:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 10:24:39 UTC ---
Mine, in case that helps (it's in tree-cfg.c)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-03-01 10:25 ` rguenth at gcc dot gnu.org
@ 2012-03-01 12:26 ` rguenth at gcc dot gnu.org
  2012-03-01 12:28 ` rguenth at gcc dot gnu.org
  2012-03-01 13:36 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01 12:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 12:26:25 UTC ---
Author: rguenth
Date: Thu Mar  1 12:26:20 2012
New Revision: 184739

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184739
Log:
2012-03-01  Richard Guenther  <rguenther@suse.de>

    PR middle-end/52443
    * tree-cfg.c (verify_gimple_assign_unary): Allow any
    conversions from integral types to pointer types.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-cfg.c


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-03-01 12:26 ` rguenth at gcc dot gnu.org
@ 2012-03-01 12:28 ` rguenth at gcc dot gnu.org
  2012-03-01 13:36 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-01 12:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 12:27:43 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
  2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-03-01 12:28 ` rguenth at gcc dot gnu.org
@ 2012-03-01 13:36 ` gjl at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-03-01 13:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443

--- Comment #8 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-03-01 13:36:08 UTC ---
Yes, thanks. It works now :-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-01 13:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 22:11 [Bug other/52443] New: ICE: verify_gimple failed: invalid types in nop conversion gjl at gcc dot gnu.org
2012-02-29 22:12 ` [Bug other/52443] " gjl at gcc dot gnu.org
2012-02-29 22:19 ` gjl at gcc dot gnu.org
2012-03-01  9:51 ` rguenth at gcc dot gnu.org
2012-03-01 10:20 ` rguenth at gcc dot gnu.org
2012-03-01 10:24 ` rguenth at gcc dot gnu.org
2012-03-01 10:25 ` rguenth at gcc dot gnu.org
2012-03-01 12:26 ` rguenth at gcc dot gnu.org
2012-03-01 12:28 ` rguenth at gcc dot gnu.org
2012-03-01 13:36 ` gjl 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).