public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
@ 2006-04-17 18:46 ` pinskia at gcc dot gnu dot org
  2006-04-17 19:55 ` rguenth at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-17 18:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
   Target Milestone|---                         |4.0.4


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


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

* [Bug c/27184]  New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
@ 2006-04-17 18:46 pinskia at gcc dot gnu dot org
  2006-04-17 18:46 ` [Bug c/27184] " pinskia at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-17 18:46 UTC (permalink / raw)
  To: gcc-bugs

Testcase (at -O2 and above):
typedef long atype[];
typedef long atype1[];
int NumSift (atype *a, atype1 *a1)
{
  (*a)[0] = 0;
  (*a1)[0] = 1;
  return (*a)[0];
}
int main(void)
{
  long a[2];
  if (!NumSift(&a, &a))
    __builtin_abort ();
  return 0;
}
------
Orginally reported here:
http://gcc.gnu.org/ml/gcc/2006-03/msg00638.html


-- 
           Summary: [4.0/4.1/4.2 Regression] Wrong code with pointers to
                    arrays and types and strict aliasing
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-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=27184


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
  2006-04-17 18:46 ` [Bug c/27184] " pinskia at gcc dot gnu dot org
@ 2006-04-17 19:55 ` rguenth at gcc dot gnu dot org
  2006-04-17 20:07 ` rguenth at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-17 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-04-17 19:55 -------
Just to add some information from the conversation on this topic:

 > > Shouldn't the aliasing set for the type atype be the same as atype1?
 > 
 > Im not entirely sure, but the C99 standard does at least not suggest
 > otherwise, instead it says (6.7.7/3) "A typedef declaration does not
introduce
 > a new type, only a synonym for the type so specified."

atype and atype1 are compatible bacsue of 6.7.5.2, Array declarators:

6   For two array types to be compatible, both shall have compatible
    element types, and if both size specifiers are present, and are
    integer constant expressions, then both size specifiers shall have
    the same constant value. If the two array types are used in a
    context which requires them to be compatible, it is undefined
    behavior if the two size specifiers evaluate to unequal values.

I assume that compatible types should be in the same alias set.


-- 


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
  2006-04-17 18:46 ` [Bug c/27184] " pinskia at gcc dot gnu dot org
  2006-04-17 19:55 ` rguenth at gcc dot gnu dot org
@ 2006-04-17 20:07 ` rguenth at gcc dot gnu dot org
  2006-05-29  8:10 ` aoliva at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-17 20:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2006-04-17 20:07 -------
And this only fails for array types without their size specified.  Confirmed.

Btw. inside NumShift the two array types are

 <array_type 0xb7d86398 atype
    type <integer_type 0xb7d1733c long int sizes-gimplified public SI
        size <integer_cst 0xb7d07408 constant invariant 32>
        unit size <integer_cst 0xb7d07198 constant invariant 4>
        align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0xb7d07498
-2147483648> max <integer_cst 0xb7d074b0 2147483647>
        pointer_to_this <pointer_type 0xb7d1f114>>
    BLK
    align 32 symtab 0 alias set -1
    pointer_to_this <pointer_type 0xb7d864ac>>

 <array_type 0xb7d86450 atype1
    type <integer_type 0xb7d1733c long int sizes-gimplified public SI
        size <integer_cst 0xb7d07408 constant invariant 32>
        unit size <integer_cst 0xb7d07198 constant invariant 4>
        align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0xb7d07498
-2147483648> max <integer_cst 0xb7d074b0 2147483647>
        pointer_to_this <pointer_type 0xb7d1f114>>
    BLK
    align 32 symtab 0 alias set -1
    pointer_to_this <pointer_type 0xb7d86508>>

still we create

Variable: aD.1278, UID 1278, long intD.2[<unknown>] *, type memory tag:
TMT.5D.1303, default def: aD.1278_1

Variable: a1D.1279, UID 1279, long intD.2[<unknown>] *, type memory tag:
TMT.6D.1304, default def: a1D.1279_2

  #   TMT.5D.1303_6 = V_MAY_DEF <TMT.5D.1303_5>;
  (*aD.1278_1)[0] = 0;
  #   TMT.6D.1304_8 = V_MAY_DEF <TMT.6D.1304_7>;
  (*a1D.1279_2)[0] = 1;
  #   VUSE <TMT.5D.1303_6>;
  D.1282_3 = (*aD.1278_1)[0];


-- 

rguenth 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         |2006-04-17 20:07:06
               date|                            |


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-04-17 20:07 ` rguenth at gcc dot gnu dot org
@ 2006-05-29  8:10 ` aoliva at gcc dot gnu dot org
  2006-05-29  9:18 ` aoliva at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-05-29  8:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from aoliva at gcc dot gnu dot org  2006-05-29 08:09 -------
Mine


-- 

aoliva at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |aoliva at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-04-17 20:07:06         |2006-05-29 08:09:53
               date|                            |


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-29  8:10 ` aoliva at gcc dot gnu dot org
@ 2006-05-29  9:18 ` aoliva at gcc dot gnu dot org
  2006-05-30  6:33 ` aoliva at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-05-29  9:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from aoliva at gcc dot gnu dot org  2006-05-29 09:18 -------
Created an attachment (id=11526)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11526&action=view)
Patch that appears to fix the problem

Here's a patch I'm trying to fix the problem.  Hopefully I've caught all cases
of modifying array ranges in place, which would break under the sharing of
types I've introduced.


-- 


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-05-29  9:18 ` aoliva at gcc dot gnu dot org
@ 2006-05-30  6:33 ` aoliva at gcc dot gnu dot org
  2006-06-04 18:27 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-05-30  6:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from aoliva at gcc dot gnu dot org  2006-05-30 06:32 -------
Created an attachment (id=11533)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11533&action=view)
Patch that fixes the problem and does not introduce regressions

The previous patch had a few regressions in vlas, all fixed in this newer
revision of the patch, just submitted to gcc-patches.


-- 

aoliva at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #11526|0                           |1
        is obsolete|                            |


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-05-30  6:33 ` aoliva at gcc dot gnu dot org
@ 2006-06-04 18:27 ` mmitchel at gcc dot gnu dot org
  2006-06-20  2:06 ` patchapp at dberlin dot org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 18:27 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=27184


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-06-04 18:27 ` mmitchel at gcc dot gnu dot org
@ 2006-06-20  2:06 ` patchapp at dberlin dot org
  2006-06-30  3:10 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: patchapp at dberlin dot org @ 2006-06-20  2:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from patchapp at dberlin dot org  2006-06-20 01:31 -------
Subject: Bug number PR c/27184

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01507.html


-- 


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-06-20  2:06 ` patchapp at dberlin dot org
@ 2006-06-30  3:10 ` pinskia at gcc dot gnu dot org
  2006-07-20 21:34 ` steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-30  3:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2006-06-30 03:09 -------
I am rebootstrapping this patch right now and will commit tommorow.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|aoliva at gcc dot gnu dot   |pinskia at gcc dot gnu dot
                   |org                         |org


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-06-30  3:10 ` pinskia at gcc dot gnu dot org
@ 2006-07-20 21:34 ` steven at gcc dot gnu dot org
  2006-08-08  0:56 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-07-20 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from steven at gcc dot gnu dot org  2006-07-20 21:34 -------
Ping!


-- 


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-07-20 21:34 ` steven at gcc dot gnu dot org
@ 2006-08-08  0:56 ` pinskia at gcc dot gnu dot org
  2006-08-13 20:17 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-08  0:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-08-08 00:56 -------
I have been having problems with my work machine to be able to test this patch
(before applying it) but hopefuly it will finish this time.
If it does not work, I am going to test it using my home machine.


-- 


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


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

* [Bug c/27184] [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-08-08  0:56 ` pinskia at gcc dot gnu dot org
@ 2006-08-13 20:17 ` pinskia at gcc dot gnu dot org
  2006-08-13 20:17 ` [Bug c/27184] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-13 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-08-13 20:16 -------
Subject: Bug 27184

Author: pinskia
Date: Sun Aug 13 21:16:46 2006
New Revision: 116116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116116
Log:
2006-08-13  Alexandre Oliva  <aoliva@redhat.com>
            Andrew Pinski  <pinskia@physics.uc.edu>

        PR c/27184
        * tree.c (build_array_type): Unify array types with
        unspecified index_type.
        * c-decl.c (grokdeclarator): Make sure we do not modify a
        unified incomplete array type.
        * c-typeck.c (store_init_value): Create distinct type before
        filling in the index type in an initializer from a compound
        literal.

        * c-decl.c (grokdeclarator): Remove code where we copy the
        array type over.

2006-08-13  Alexandre Oliva  <aoliva@redhat.com>

        PR c/27184
        * gcc.dg/torture/pr27184.c: New test


Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr27184.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-decl.c
    trunk/gcc/c-typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree.c


-- 


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2006-08-13 20:17 ` pinskia at gcc dot gnu dot org
@ 2006-08-13 20:17 ` pinskia at gcc dot gnu dot org
  2006-08-28  8:12 ` christian dot joensson at gmail dot com
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-13 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-08-13 20:17 -------
Fixed on the mainline, will apply to the branches after a week or so.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |http://gcc.gnu.org/ml/gcc-
                   |patches/2006-               |patches/2006-
                   |05/msg01507.html            |08/msg00412.html
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1 Regression] Wrong
                   |Wrong code with pointers to |code with pointers to arrays
                   |arrays and types and strict |and types and strict
                   |aliasing                    |aliasing


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2006-08-13 20:17 ` [Bug c/27184] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-08-28  8:12 ` christian dot joensson at gmail dot com
  2006-08-31 11:00 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: christian dot joensson at gmail dot com @ 2006-08-28  8:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from christian dot joensson at gmail dot com  2006-08-28 08:12 -------
(In reply to comment #11)
> Fixed on the mainline, will apply to the branches after a week or so.
> 

So, how's this going for 4.1?


-- 

christian dot joensson at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christian dot joensson at
                   |                            |gmail dot com


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2006-08-28  8:12 ` christian dot joensson at gmail dot com
@ 2006-08-31 11:00 ` pinskia at gcc dot gnu dot org
  2006-10-04 17:18 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-31 11:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2006-08-31 11:00 -------
(In reply to comment #12)
> So, how's this going for 4.1?
Well a regression was found in 4.2 caused by this patch so I am going to fix
that first.


-- 


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2006-08-31 11:00 ` pinskia at gcc dot gnu dot org
@ 2006-10-04 17:18 ` pinskia at gcc dot gnu dot org
  2006-10-16  9:36 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-04 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pinskia at gcc dot gnu dot org  2006-10-04 17:17 -------
The patch does not apply cleanly to the 4.1 branch so I am going to fix this.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2006-10-04 17:18 ` pinskia at gcc dot gnu dot org
@ 2006-10-16  9:36 ` rguenth at gcc dot gnu dot org
  2006-10-16 11:18 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16  9:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from rguenth at gcc dot gnu dot org  2006-10-16 09:36 -------
I'll take care of this.  (Bootstrap running)


-- 

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|2006-05-29 08:09:53         |2006-10-16 09:36:06
               date|                            |


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


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

* [Bug c/27184] [4.0/4.1 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2006-10-16  9:36 ` rguenth at gcc dot gnu dot org
@ 2006-10-16 11:18 ` rguenth at gcc dot gnu dot org
  2006-10-16 11:19 ` [Bug c/27184] [4.0 " rguenth at gcc dot gnu dot org
  2007-01-25 15:55 ` gdr at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16 11:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from rguenth at gcc dot gnu dot org  2006-10-16 11:18 -------
Subject: Bug 27184

Author: rguenth
Date: Mon Oct 16 11:18:28 2006
New Revision: 117782

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117782
Log:
2006-10-16  Richard Guenther  <rguenther@suse.de>

        Backport from mainline:
        2006-08-13  Alexandre Oliva  <aoliva@redhat.com>
                    Andrew Pinski  <pinskia@physics.uc.edu>

        PR c/27184
        * tree.c (build_array_type): Unify array types with
        unspecified index_type.
        * c-decl.c (grokdeclarator): Make sure we do not modify a
        unified incomplete array type.
        * c-typeck.c (store_init_value): Create distinct type before
        filling in the index type in an initializer from a compound
        literal.

        * c-decl.c (grokdeclarator): Remove code where we copy the
        array type over.

        2006-08-13  Alexandre Oliva  <aoliva@redhat.com>

        PR c/27184
        * gcc.dg/torture/pr27184.c: New test

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr27184.c
      - copied unchanged from r116116,
trunk/gcc/testsuite/gcc.dg/torture/pr27184.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/c-decl.c
    branches/gcc-4_1-branch/gcc/c-typeck.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree.c


-- 


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


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

* [Bug c/27184] [4.0 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2006-10-16 11:18 ` rguenth at gcc dot gnu dot org
@ 2006-10-16 11:19 ` rguenth at gcc dot gnu dot org
  2007-01-25 15:55 ` gdr at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-16 11:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2006-10-16 11:19 -------
Fixed on the 4.1 branch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 Regression] Wrong  |[4.0 Regression] Wrong code
                   |code with pointers to arrays|with pointers to arrays and
                   |and types and strict        |types and strict aliasing
                   |aliasing                    |


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


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

* [Bug c/27184] [4.0 Regression] Wrong code with pointers to arrays and types and strict aliasing
  2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2006-10-16 11:19 ` [Bug c/27184] [4.0 " rguenth at gcc dot gnu dot org
@ 2007-01-25 15:55 ` gdr at gcc dot gnu dot org
  19 siblings, 0 replies; 21+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-01-25 15:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from gdr at gcc dot gnu dot org  2007-01-25 15:54 -------
Fixed in GCC-4.1.2 and higher.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


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


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

end of thread, other threads:[~2007-01-25 15:55 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-17 18:46 [Bug c/27184] New: [4.0/4.1/4.2 Regression] Wrong code with pointers to arrays and types and strict aliasing pinskia at gcc dot gnu dot org
2006-04-17 18:46 ` [Bug c/27184] " pinskia at gcc dot gnu dot org
2006-04-17 19:55 ` rguenth at gcc dot gnu dot org
2006-04-17 20:07 ` rguenth at gcc dot gnu dot org
2006-05-29  8:10 ` aoliva at gcc dot gnu dot org
2006-05-29  9:18 ` aoliva at gcc dot gnu dot org
2006-05-30  6:33 ` aoliva at gcc dot gnu dot org
2006-06-04 18:27 ` mmitchel at gcc dot gnu dot org
2006-06-20  2:06 ` patchapp at dberlin dot org
2006-06-30  3:10 ` pinskia at gcc dot gnu dot org
2006-07-20 21:34 ` steven at gcc dot gnu dot org
2006-08-08  0:56 ` pinskia at gcc dot gnu dot org
2006-08-13 20:17 ` pinskia at gcc dot gnu dot org
2006-08-13 20:17 ` [Bug c/27184] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-08-28  8:12 ` christian dot joensson at gmail dot com
2006-08-31 11:00 ` pinskia at gcc dot gnu dot org
2006-10-04 17:18 ` pinskia at gcc dot gnu dot org
2006-10-16  9:36 ` rguenth at gcc dot gnu dot org
2006-10-16 11:18 ` rguenth at gcc dot gnu dot org
2006-10-16 11:19 ` [Bug c/27184] [4.0 " rguenth at gcc dot gnu dot org
2007-01-25 15:55 ` gdr 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).