public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36172]  New: ice for legal code with -O3
@ 2008-05-07 17:10 dcb314 at hotmail dot com
  2008-05-07 17:11 ` [Bug c/36172] " dcb314 at hotmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2008-05-07 17:10 UTC (permalink / raw)
  To: gcc-bugs

I just tried to compile the Suse Linux package
fontconfig-2.4.2-83 with the GNU C compiler  
version 4.4 snapshot 20080502

The compiler said

fccharset.c:1174: internal compiler error: in compare_values_warnv, at
tree-vrp.c:892
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. Flag -O3 required.


-- 
           Summary: ice for legal code with -O3
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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


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

* [Bug c/36172] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
@ 2008-05-07 17:11 ` dcb314 at hotmail dot com
  2008-05-07 19:59 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2008-05-07 17:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dcb314 at hotmail dot com  2008-05-07 17:10 -------
Created an attachment (id=15591)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15591&action=view)
C source code


-- 


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


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

* [Bug middle-end/36172] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
  2008-05-07 17:11 ` [Bug c/36172] " dcb314 at hotmail dot com
  2008-05-07 19:59 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-05-07 19:59 ` pinskia at gcc dot gnu dot org
  2008-05-07 20:00 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-07 19:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-05-07 19:58 -------
This worked with 20080325.


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
  2008-05-07 17:11 ` [Bug c/36172] " dcb314 at hotmail dot com
@ 2008-05-07 19:59 ` pinskia at gcc dot gnu dot org
  2008-05-07 19:59 ` [Bug middle-end/36172] " pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-07 19:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ice for legal code with -O3 |[4.4 Regression] ice for
                   |                            |legal code with -O3
   Target Milestone|---                         |4.4.0


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2008-05-07 19:59 ` [Bug middle-end/36172] " pinskia at gcc dot gnu dot org
@ 2008-05-07 20:00 ` pinskia at gcc dot gnu dot org
  2008-05-07 20:09 ` rguenth at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-07 20:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-05-07 20:00 -------
  gcc_assert (POINTER_TYPE_P (TREE_TYPE (val1))
              == POINTER_TYPE_P (TREE_TYPE (val2)));

:)


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2008-05-07 20:00 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-05-07 20:09 ` rguenth at gcc dot gnu dot org
  2008-05-07 20:31 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 20:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-05-07 20:08 -------
Reducing.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2008-05-07 20:09 ` rguenth at gcc dot gnu dot org
@ 2008-05-07 20:31 ` pinskia at gcc dot gnu dot org
  2008-05-07 20:46 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-07 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2008-05-07 20:30 -------
  # prephitmp.1564_417 = PHI <prephitmp.1561_268(20), pretmp.1563_427(4)>


  long unsigned int pretmp.1563;


prephitmp.1561 is a pointer.


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2008-05-07 20:31 ` pinskia at gcc dot gnu dot org
@ 2008-05-07 20:46 ` rguenth at gcc dot gnu dot org
  2008-05-07 21:11 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-05-07 20:45 -------
Created an attachment (id=15614)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15614&action=view)
somehwat reduced testcase

It's probably PPRE that messes up (-O3 -fno-tree-pre is fine, -O2
-finline-functions as well).


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2008-05-07 20:46 ` rguenth at gcc dot gnu dot org
@ 2008-05-07 21:11 ` pinskia at gcc dot gnu dot org
  2008-05-07 21:38 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-07 21:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2008-05-07 21:10 -------
Better reduced testcase:
typedef unsigned long int uintptr_t;
typedef struct _FcCharLeaf { } FcCharLeaf;
struct _FcCharLeafEnt {
  unsigned int hash;
  int leaf;
};
struct _FcCharSetFreezer
{
  int orig_hash_table[67];
};
struct _FcCharLeafEnt *ent;
int a, f(FcCharLeaf * );
void FcCharSetFreeze (struct _FcCharSetFreezer *freezer, int *fcs)
{
  int i;
  for (i = 0;  i < *fcs;  i++)
  {
    FcCharLeaf *leaf = (FcCharLeaf *)fcs;
    unsigned int hash = f (leaf);
    if (ent->hash == hash)
      a = ent->leaf;
    if (!a)
      return;
  }
  freezer->orig_hash_table[((uintptr_t) fcs) & 67] = 0;
}


PRE is creating the mismatched PHI nodes.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-05-07 21:10:58
               date|                            |


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2008-05-07 21:11 ` pinskia at gcc dot gnu dot org
@ 2008-05-07 21:38 ` rguenth at gcc dot gnu dot org
  2008-05-07 21:48 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 21:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2008-05-07 21:37 -------
More reduced:

int f(float * );
__SIZE_TYPE__ FcCharSetFreeze (int *fcs, int b)
{
  int i;
  int a = 0;
  for (i = 0; i < *fcs; i++)
  {
    float *leaf = (float *)fcs;
    int hash = f (leaf);
    if (hash)
      a = b;
    if (!a)
      return;
  }
  return (__SIZE_TYPE__) fcs;
}


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2008-05-07 21:38 ` rguenth at gcc dot gnu dot org
@ 2008-05-07 21:48 ` rguenth at gcc dot gnu dot org
  2008-05-07 21:51 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2008-05-07 21:47 -------
PA_IN/OUT computes different for s/(unsigned long)/(long)/ in the following
testcase (long works):

int f(float * );
unsigned long FcCharSetFreeze (int *fcs, int b)
{
  int i;
  int a = 0;
  for (i = 0; i < *fcs; i++)
  {
    float *leaf = (float *)fcs;
    int hash = f (leaf);
    if (hash)
      a = b;
    if (!a)
      return;
  }
  return (unsigned long) fcs;
}


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2008-05-07 21:48 ` rguenth at gcc dot gnu dot org
@ 2008-05-07 21:51 ` rguenth at gcc dot gnu dot org
  2008-05-07 21:54 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2008-05-07 21:50 -------
operand_equal_p returns true for (float *) VH.11 and (long unsigned int) VH.11.


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (10 preceding siblings ...)
  2008-05-07 21:51 ` rguenth at gcc dot gnu dot org
@ 2008-05-07 21:54 ` rguenth at gcc dot gnu dot org
  2008-05-08  8:20 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-07 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2008-05-07 21:54 -------
I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-05-07 21:10:58         |2008-05-07 21:54:03
               date|                            |


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (11 preceding siblings ...)
  2008-05-07 21:54 ` rguenth at gcc dot gnu dot org
@ 2008-05-08  8:20 ` rguenth at gcc dot gnu dot org
  2008-05-08  8:25 ` rguenth at gcc dot gnu dot org
  2008-05-08  8:30 ` rguenth at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-08  8:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2008-05-08 08:20 -------
Subject: Bug 36172

Author: rguenth
Date: Thu May  8 08:19:16 2008
New Revision: 135070

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135070
Log:
2008-05-08  Richard Guenther  <rguenther@suse.de>

        PR middle-end/36172
        * fold-const.c (operand_equal_p): Two objects which types
        differ in pointerness are not equal.

        * gcc.c-torture/compile/pr36172.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr36172.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (12 preceding siblings ...)
  2008-05-08  8:20 ` rguenth at gcc dot gnu dot org
@ 2008-05-08  8:25 ` rguenth at gcc dot gnu dot org
  2008-05-08  8:30 ` rguenth at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-08  8:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2008-05-08 08:24 -------
Subject: Bug 36172

Author: rguenth
Date: Thu May  8 08:23:59 2008
New Revision: 135072

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135072
Log:
2008-05-08  Richard Guenther  <rguenther@suse.de>

        PR middle-end/36154
        * tree-ssa-structalias.c (push_fields_onto_fieldstack): Make
        sure to create a representative for trailing arrays for PTA.

        * gcc.c-torture/compile/pr36154.c: New testcase.

2008-05-08  Richard Guenther  <rguenther@suse.de>

        PR middle-end/36172
        * fold-const.c (operand_equal_p): Two objects which types
        differ in pointerness are not equal.

        * gcc.c-torture/compile/pr36172.c: New testcase.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr36154.c
      - copied unchanged from r135071,
trunk/gcc/testsuite/gcc.c-torture/compile/pr36154.c
    branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/compile/pr36172.c
      - copied unchanged from r135071,
trunk/gcc/testsuite/gcc.c-torture/compile/pr36172.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/fold-const.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_3-branch/gcc/tree-ssa-structalias.c


-- 


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


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

* [Bug middle-end/36172] [4.4 Regression] ice for legal code with -O3
  2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
                   ` (13 preceding siblings ...)
  2008-05-08  8:25 ` rguenth at gcc dot gnu dot org
@ 2008-05-08  8:30 ` rguenth at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-08  8:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from rguenth at gcc dot gnu dot org  2008-05-08 08:30 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-05-08  8:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07 17:10 [Bug c/36172] New: ice for legal code with -O3 dcb314 at hotmail dot com
2008-05-07 17:11 ` [Bug c/36172] " dcb314 at hotmail dot com
2008-05-07 19:59 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-05-07 19:59 ` [Bug middle-end/36172] " pinskia at gcc dot gnu dot org
2008-05-07 20:00 ` [Bug middle-end/36172] [4.4 Regression] " pinskia at gcc dot gnu dot org
2008-05-07 20:09 ` rguenth at gcc dot gnu dot org
2008-05-07 20:31 ` pinskia at gcc dot gnu dot org
2008-05-07 20:46 ` rguenth at gcc dot gnu dot org
2008-05-07 21:11 ` pinskia at gcc dot gnu dot org
2008-05-07 21:38 ` rguenth at gcc dot gnu dot org
2008-05-07 21:48 ` rguenth at gcc dot gnu dot org
2008-05-07 21:51 ` rguenth at gcc dot gnu dot org
2008-05-07 21:54 ` rguenth at gcc dot gnu dot org
2008-05-08  8:20 ` rguenth at gcc dot gnu dot org
2008-05-08  8:25 ` rguenth at gcc dot gnu dot org
2008-05-08  8:30 ` rguenth 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).