public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
@ 2005-10-04  2:43 ` pinskia at gcc dot gnu dot org
  2005-10-04  3:05 ` pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-04  2:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from pinskia at gcc dot gnu dot org  2005-10-04 02:43 -------
I am going to fix this tonight.


-- 

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=23067


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
  2005-10-04  2:43 ` [Bug target/23067] Incorrect struct layout on darwin pinskia at gcc dot gnu dot org
@ 2005-10-04  3:05 ` pinskia at gcc dot gnu dot org
  2005-10-04 19:49 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-04  3:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from pinskia at gcc dot gnu dot org  2005-10-04 03:05 -------
Created an attachment (id=9867)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9867&action=view)
Patch which I am testing

This is the correct version of your patch which does not effect AIX or
PPC64-linux (with -malign-power which is not default).


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
  2005-10-04  2:43 ` [Bug target/23067] Incorrect struct layout on darwin pinskia at gcc dot gnu dot org
  2005-10-04  3:05 ` pinskia at gcc dot gnu dot org
@ 2005-10-04 19:49 ` pinskia at gcc dot gnu dot org
  2005-10-05 15:06 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-04 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from pinskia at gcc dot gnu dot org  2005-10-04 19:49 -------
Need to retest, I was compiling with a bad version of 4.1 which causes us to
fail with some varargs.


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-10-04 19:49 ` pinskia at gcc dot gnu dot org
@ 2005-10-05 15:06 ` pinskia at gcc dot gnu dot org
  2005-10-05 15:21 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-05 15:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from pinskia at gcc dot gnu dot org  2005-10-05 15:06 -------
The patch causes the following failures:
FAIL: libffi.call/nested_struct3.c execution test


This is because libffi gets the alignment wrong.  I have to look into libffi's
code.


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2005-10-05 15:06 ` pinskia at gcc dot gnu dot org
@ 2005-10-05 15:21 ` pinskia at gcc dot gnu dot org
  2005-10-06 18:37 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-05 15:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from pinskia at gcc dot gnu dot org  2005-10-05 15:21 -------
(In reply to comment #18)
> This is because libffi gets the alignment wrong.  I have to look into libffi's
> code.

And I have a fix for that too.


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2005-10-05 15:21 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 18:37 ` pinskia at gcc dot gnu dot org
  2005-10-06 18:40 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 18:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from pinskia at gcc dot gnu dot org  2005-10-06 18:37 -------
I give up, 3 days no luck at getting this correct.

The current patch follows:
Index: src/powerpc/ffi_darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/powerpc/ffi_darwin.c,v
retrieving revision 1.13
diff -u -r1.13 ffi_darwin.c
--- src/powerpc/ffi_darwin.c    2 Sep 2004 21:14:45 -0000       1.13
+++ src/powerpc/ffi_darwin.c    6 Oct 2005 10:33:11 -0000
@@ -195,10 +195,15 @@
             SI 4 bytes) are aligned as if they were those modes.
             Structures with 3 byte in size are padded upwards.  */
          size_al = (*ptr)->size;
-         /* If the first member of the struct is a double, then align
-            the struct to double-word.
-            Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3.  */
-         if ((*ptr)->elements[0]->type == 3)
+         /* If the first member of the struct is a double or an [unsigned]
+            long long, then align the struct to double-word.
+            Type 3, 11, and 12 are defined in include/ffi.h.
+            #define FFI_TYPE_DOUBLE     3
+            #define FFI_TYPE_UINT64     11
+            #define FFI_TYPE_SINT64     12  */
+         if ((*ptr)->elements[0]->type == 3
+             || (*ptr)->elements[0]->type == 11
+             || (*ptr)->elements[0]->type == 12)
            size_al = ALIGN((*ptr)->size, 8);
          if (size_al < 3 && ecif->cif->abi == FFI_DARWIN)
            dest_cpy += 4 - size_al;
@@ -337,10 +342,15 @@

        case FFI_TYPE_STRUCT:
          size_al = (*ptr)->size;
-         /* If the first member of the struct is a double, then align
-            the struct to double-word.
-            Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3.  */
-         if ((*ptr)->elements[0]->type == 3)
+         /* If the first member of the struct is a double or an [unsigned]
+            long long, then align the struct to double-word.
+            Type 3, 11, and 12 are defined in include/ffi.h.
+            #define FFI_TYPE_DOUBLE     3
+            #define FFI_TYPE_UINT64     11
+            #define FFI_TYPE_SINT64     12  */
+         if ((*ptr)->elements[0]->type == 3
+             || (*ptr)->elements[0]->type == 11
+             || (*ptr)->elements[0]->type == 12)
            size_al = ALIGN((*ptr)->size, 8);
          intarg_count += (size_al + 3) / 4;
          break;
@@ -671,10 +681,15 @@
          /* Structures that match the basic modes (QI 1 byte, HI 2 bytes,
             SI 4 bytes) are aligned as if they were those modes.  */
          size_al = arg_types[i]->size;
-         /* If the first member of the struct is a double, then align
-            the struct to double-word.
-            Type 3 is defined in include/ffi.h. #define FFI_TYPE_DOUBLE 3.  */
-         if (arg_types[i]->elements[0]->type == 3)
+         /* If the first member of the struct is a double or an [unsigned]
+            long long, then align the struct to double-word.
+            Type 3, 11, and 12 are defined in include/ffi.h.
+            #define FFI_TYPE_DOUBLE     3
+            #define FFI_TYPE_UINT64     11
+            #define FFI_TYPE_SINT64     12  */
+         if (arg_types[i]->elements[0]->type == 3
+             || arg_types[i]->elements[0]->type == 11
+             || arg_types[i]->elements[0]->type == 12)
            size_al = ALIGN(arg_types[i]->size, 8);
          if (size_al < 3 && cif->abi == FFI_DARWIN)
            avalue[i] = (void*) pgr + 4 - size_al;
Index: gcc/config/rs6000/darwin.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/darwin.h,v
retrieving revision 1.93
diff -u -p -r1.93 darwin.h
--- gcc/config/rs6000/darwin.h  28 Sep 2005 23:50:05 -0000      1.93
+++ gcc/config/rs6000/darwin.h  5 Oct 2005 20:13:33 -0000
@@ -347,12 +347,12 @@ do {                                                     
                \
 #define ALWAYS_PUSH_CONSTS_USING_REGS_P                1

 /* This now supports a natural alignment mode */
-/* Darwin word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
+/* Darwin word-aligns FP doubles and 64-bit ints.  */
 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
   (TARGET_ALIGN_NATURAL ? (COMPUTED) : \
-  (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
+   ((1 << (TYPE_MODE (TREE_CODE (TREE_TYPE (FIELD)) == ARRAY_TYPE \
              ? get_inner_array_type (FIELD) \
-             : TREE_TYPE (FIELD)) == DFmode \
+             : TREE_TYPE (FIELD))) & ((1 << DFmode)|(1 << DImode))) \
    ? MIN ((COMPUTED), 32) : (COMPUTED)))

 /* Darwin increases natural record alignment to doubleword if the first
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.870
diff -u -p -r1.870 rs6000.c
--- gcc/config/rs6000/rs6000.c  26 Sep 2005 19:12:30 -0000      1.870
+++ gcc/config/rs6000/rs6000.c  5 Oct 2005 20:13:46 -0000
@@ -2438,7 +2438,8 @@ invalid_e500_subreg (rtx op, enum machin
 }

 /* Darwin, AIX increases natural record alignment to doubleword if the first
-   field is an FP double while the FP fields remain word aligned.  */
+   field is an FP double while the FP fields remain word aligned.
+   Darwin also increase it for long long too.  */

 unsigned int
 rs6000_special_round_type_align (tree type, int computed, int specified)
@@ -2449,7 +2450,9 @@ rs6000_special_round_type_align (tree ty
   while (field != NULL && TREE_CODE (field) != FIELD_DECL)
     field = TREE_CHAIN (field);

-  if (field == NULL || field == type || DECL_MODE (field) != DFmode)
+  if (field == NULL || field == type
+      || (DECL_MODE (field) != DFmode
+          && !(DEFAULT_ABI == ABI_DARWIN && DECL_MODE (field) == DImode)))
     return MAX (computed, specified);

   return MAX (MAX (computed, specified), 64);
Index: libobjc/encoding.c
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/encoding.c,v
retrieving revision 1.26
diff -u -p -r1.26 encoding.c
--- libobjc/encoding.c  17 Aug 2005 03:17:54 -0000      1.26
+++ libobjc/encoding.c  5 Oct 2005 20:14:10 -0000
@@ -73,6 +73,7 @@ Boston, MA 02110-1301, USA.  */
 #define TYPE_MODE(TYPE) *(TYPE)

 #define DFmode          _C_DBL
+#define DImode          _C_LNG_LNG

 #define get_inner_array_type(TYPE)      ((TYPE) + 1)



-- 

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=23067


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2005-10-06 18:37 ` pinskia at gcc dot gnu dot org
@ 2005-10-06 18:40 ` pinskia at gcc dot gnu dot org
  2005-12-14  2:50 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-06 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from pinskia at gcc dot gnu dot org  2005-10-06 18:40 -------
Libffi's failure info from Andreas T.:

The chunk form ffi_darwin.c has to be applied three times. Attached.
Although, with this modification I get a fail but it looks much better.

 andreast% ./nested_struct3.exe
1 7 12 127 0: 13 134 134 <----- the char from the second struct gets lost.
1 7 12 127 99: 13 233 134

(I commented the CHECK in the test)


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2005-10-06 18:40 ` pinskia at gcc dot gnu dot org
@ 2005-12-14  2:50 ` pinskia at gcc dot gnu dot org
  2005-12-14 20:10 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-14  2:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from pinskia at gcc dot gnu dot org  2005-12-14 02:50 -------
Here is a couple more structs which FSF's GCC gets wrong:
struct f{int c; struct {long long t;}; d;};
---
struct a{int tt; long long t; int i;};
struct f{int tt; struct a d; int t;};
----
struct a{long long t; int i;};
struct f{int tt; struct a d; int t;};

There might be a lot more.  All related to "long long".


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2005-12-14  2:50 ` pinskia at gcc dot gnu dot org
@ 2005-12-14 20:10 ` pinskia at gcc dot gnu dot org
  2005-12-31 22:21 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-14 20:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from pinskia at gcc dot gnu dot org  2005-12-14 20:10 -------
(In reply to comment #22)

> struct a{long long t; int i;};
> struct f{int tt; struct a d; int t;};

This one is still wrong after the (updated) patch in comment #20.
The size which Apple's GCC gives is 24 but the FSF gcc gives 32 even after
using the patch in comment #20.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2005-12-14 20:10 ` pinskia at gcc dot gnu dot org
@ 2005-12-31 22:21 ` pinskia at gcc dot gnu dot org
  2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-31 22:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from pinskia at gcc dot gnu dot org  2005-12-31 22:21 -------
/* { dg-require-effective-target ilp32 } */

That is required for the testcases by the way to make sure that they are only
run on the 32bit powerpc-darwin.


-- 


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



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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2005-12-31 22:21 ` pinskia at gcc dot gnu dot org
@ 2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
  2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-10-16 21:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from geoffk at gcc dot gnu dot org  2006-10-16 21:46 -------
*** Bug 25630 has been marked as a duplicate of this bug. ***


-- 

geoffk at gcc dot gnu dot org changed:

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


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
@ 2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
  2006-10-16 21:54 ` geoffk at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-10-16 21:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |geoffk at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
      Known to fail|3.3.3 3.4.0 4.0.0 4.1.0     |3.3.3 3.4.0 4.0.0 4.1.0
                   |                            |4.2.0
   Last reconfirmed|2005-12-10 05:34:46         |2006-10-16 21:47:38
               date|                            |


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
@ 2006-10-16 21:54 ` geoffk at gcc dot gnu dot org
  2006-11-01  5:28 ` geoffk at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-10-16 21:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2006-10-16 21:54 ` geoffk at gcc dot gnu dot org
@ 2006-11-01  5:28 ` geoffk at gcc dot gnu dot org
  2006-11-01  5:33 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-11-01  5:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from geoffk at gcc dot gnu dot org  2006-11-01 05:28 -------
Subject: Bug 23067

Author: geoffk
Date: Wed Nov  1 05:28:41 2006
New Revision: 118365

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118365
Log:
In gcc/:
        PR 23067
        * c-decl.c (start_struct): Don't create self-containing
        structures.
        * config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
        New.
        * config/rs6000/rs6000-protos.h
        (darwin_rs6000_special_round_type_align): New.
        * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Rewrite.
        (ROUND_TYPE_ALIGN): Use darwin_rs6000_special_round_type_align.
In gcc/testsuite/:
        PR 23067
        * gcc.target/powerpc/darwin-abi-3.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-6.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-7.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-8.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-9.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-10.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-11.c: Remove XFAIL.
In libobjc/:
        * encoding.c (darwin_rs6000_special_round_type_align): New.
In libffi/:
        * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
        (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
        Darwin.
        * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
        * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/darwin.h
    trunk/gcc/config/rs6000/rs6000-protos.h
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-10.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-11.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-3.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-6.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-7.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-8.c
    trunk/gcc/testsuite/gcc.target/powerpc/darwin-abi-9.c
    trunk/libffi/ChangeLog
    trunk/libffi/src/powerpc/ffi_darwin.c
    trunk/libffi/testsuite/libffi.call/nested_struct4.c
    trunk/libffi/testsuite/libffi.call/nested_struct6.c
    trunk/libobjc/ChangeLog
    trunk/libobjc/encoding.c


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2006-11-01  5:28 ` geoffk at gcc dot gnu dot org
@ 2006-11-01  5:33 ` pinskia at gcc dot gnu dot org
  2006-11-01  5:39 ` geoffk at gcc dot gnu dot org
  2006-11-30 19:26 ` chaoyingfu at gcc dot gnu dot org
  16 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-01  5:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from pinskia at gcc dot gnu dot org  2006-11-01 05:33 -------
I think this patch just broke structs with vectors in them.


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2006-11-01  5:33 ` pinskia at gcc dot gnu dot org
@ 2006-11-01  5:39 ` geoffk at gcc dot gnu dot org
  2006-11-30 19:26 ` chaoyingfu at gcc dot gnu dot org
  16 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2006-11-01  5:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #28 from geoffk at gcc dot gnu dot org  2006-11-01 05:39 -------
All these testcases are now fixed.  I don't promise that the two compilers have
exactly the same ABI, especially for C++, but the testcases pass.


-- 

geoffk at gcc dot gnu dot org changed:

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


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


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

* [Bug target/23067] Incorrect struct layout on darwin
       [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2006-11-01  5:39 ` geoffk at gcc dot gnu dot org
@ 2006-11-30 19:26 ` chaoyingfu at gcc dot gnu dot org
  16 siblings, 0 replies; 31+ messages in thread
From: chaoyingfu at gcc dot gnu dot org @ 2006-11-30 19:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #29 from chaoyingfu at gcc dot gnu dot org  2006-11-30 19:25 -------
Subject: Bug 23067

Author: chaoyingfu
Date: Thu Nov 30 19:24:37 2006
New Revision: 119373

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119373
Log:
Merged revisions 118337-118377 via svnmerge from 
svn+ssh://chaoyingfu@sources.redhat.com/svn/gcc/trunk

........
  r118337 | charlet | 2006-10-31 12:11:46 -0800 (Tue, 31 Oct 2006) | 2 lines

  Resync.
........
  r118338 | fxcoudert | 2006-10-31 12:15:22 -0800 (Tue, 31 Oct 2006) | 12 lines

        PR fortran/29067

        * decl.c (gfc_set_constant_character_len): NULL-terminate the
        character constant string.
        * data.c (create_character_intializer): Likewise.
        * expr.c (gfc_simplify_expr): NULL-terminate the substring
        character constant.
        * primary.c (match_hollerith_constant): NULL-terminate the
        character constant string.

        * gfortran.dg/pr29067.f: New test.
........
  r118339 | fxcoudert | 2006-10-31 12:17:11 -0800 (Tue, 31 Oct 2006) | 2 lines

        * ChangeLog: Forgotten ChangeLog entry for previous commit.
........
  r118340 | charlet | 2006-10-31 12:43:39 -0800 (Tue, 31 Oct 2006) | 2 lines

  Fix typo.
........
  r118341 | tkoenig | 2006-10-31 12:58:26 -0800 (Tue, 31 Oct 2006) | 18 lines

  2006-10-31  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/29627
        * libgfortran.h: Add ERROR_SHORT_RECORD
        * runtime/error.c (translate_error): Add case
        for ERROR_SHORT_RECORD.
        * io/transfer.c (read_block_direct):  Separate codepaths
        for stream and record unformatted I/O.  Remove unneeded
        tests for standard input, padding and formatted I/O.
        If the record is short, read in as much data as possible,
        then raise the error.

  2006-10-31  Thomas Koenig  <Thomas.Koenig@online.de>

        PR libfortran/29627
        * gfortran.dg/unf_short_record_1.f90:  New test.
........
  r118343 | sje | 2006-10-31 14:28:18 -0800 (Tue, 31 Oct 2006) | 4 lines

        * inclhack.def (hpux11_extern_sendfile): New.
        (hpux11_extern_sendpath): New.
        * fixincl.x: Regenerate.
........
  r118344 | ebotcazou | 2006-10-31 15:29:06 -0800 (Tue, 31 Oct 2006) | 3 lines

          * gcc.c-torture/execute/20061031-1.c: New test.
........
  r118347 | aldot | 2006-10-31 15:38:58 -0800 (Tue, 31 Oct 2006) | 20 lines

  fortran/ChangeLog:
  2006-11-01  Bernhard Fischer  <aldot@gcc.gnu.org>

          PR fortran/29537
          * trans-common.c (gfc_trans_common): If the blank common is
          in a procedure or program without a name then proc_name is null, so
use
          the locus of the common.
          (gfc_sym_mangled_common_id): Fix whitespace.
          * match.c (gfc_match_common): Emit warning about blank common in
          block data.

  testsuite/ChangeLog:
  2006-11-01  Bernhard Fischer  <aldot@gcc.gnu.org>

          PR fortran/29537
          * gfortran.dg/blockdata_1.f90: Add warning about blank common in
block
        data.
          * gfortran.dg/blockdata_2.f90: New testcase.
........
  r118353 | gccadmin | 2006-10-31 16:17:53 -0800 (Tue, 31 Oct 2006) | 1 line

  Daily bump.
........
  r118355 | sayle | 2006-10-31 18:56:45 -0800 (Tue, 31 Oct 2006) | 10 lines


        PR middle-end/23470
        * tree.h (tree_expr_nonnegative_p): Return "bool" instead of "int".
        * fold-const.c (tree_expr_nonnegative_p): Likewise.  Consider
        pow(x,y) and powi(x,y) to be nonnegative if either x is nonnegative
        or y is an even integer.

        * gcc.dg/pr23470-1.c: New test case.
........
  r118356 | geoffk | 2006-10-31 20:47:30 -0800 (Tue, 31 Oct 2006) | 27 lines

        * c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
        inline static functions in c99 mode.

        PR 16622
        * doc/extend.texi (Inline): Update.
        * c-tree.h (struct language_function): Remove field 'extern_inline'.
        * c-decl.c (current_extern_inline): Delete.
        (pop_scope): Adjust test for an undefined nested function.
        Add warning about undeclared inline function.
        (diagnose_mismatched_decls): Update comments.  Disallow overriding
        of inline functions in a translation unit in C99.  Allow inline
        declarations in C99 at any time.
        (merge_decls): Boolize variables.  Handle C99 'extern inline'
        semantics.
        (grokdeclarator): Set DECL_EXTERNAL here for functions.  Handle
        C99 inline semantics.
        (start_function): Don't clear current_extern_inline.  Don't set
        DECL_EXTERNAL.
        (c_push_function_context): Don't push current_extern_inline.
        (c_pop_function_context): Don't restore current_extern_inline.

        PR 11377
        * c-typeck.c (build_external_ref): Warn about static variables
        used in extern inline functions.
        * c-decl.c (start_decl): Warn about static variables declared
        in extern inline functions.
........
  r118357 | geoffk | 2006-10-31 20:48:15 -0800 (Tue, 31 Oct 2006) | 27 lines

        * c-decl.c (grokdeclarator): Don't set DECL_EXTERNAL on
        inline static functions in c99 mode.

        PR 16622
        * doc/extend.texi (Inline): Update.
        * c-tree.h (struct language_function): Remove field 'extern_inline'.
        * c-decl.c (current_extern_inline): Delete.
        (pop_scope): Adjust test for an undefined nested function.
        Add warning about undeclared inline function.
        (diagnose_mismatched_decls): Update comments.  Disallow overriding
        of inline functions in a translation unit in C99.  Allow inline
        declarations in C99 at any time.
        (merge_decls): Boolize variables.  Handle C99 'extern inline'
        semantics.
        (grokdeclarator): Set DECL_EXTERNAL here for functions.  Handle
        C99 inline semantics.
        (start_function): Don't clear current_extern_inline.  Don't set
        DECL_EXTERNAL.
        (c_push_function_context): Don't push current_extern_inline.
        (c_pop_function_context): Don't restore current_extern_inline.

        PR 11377
        * c-typeck.c (build_external_ref): Warn about static variables
        used in extern inline functions.
        * c-decl.c (start_decl): Warn about static variables declared
        in extern inline functions.
........
  r118358 | geoffk | 2006-10-31 20:53:33 -0800 (Tue, 31 Oct 2006) | 3 lines

        PR 15834
        * config/darwin.h (NO_IMPLICIT_EXTERN_C): Define.
........
  r118359 | geoffk | 2006-10-31 20:55:19 -0800 (Tue, 31 Oct 2006) | 7 lines

        * config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Remove.
        * config/darwin.h (PREFERRED_DEBUGGING_TYPE): Set to DWARF2_DEBUG.

        * config/darwin.h (LINK_COMMAND_SPEC): Don't do weird things with -@.
        Call dsymutil when compiling and linking one or more source files
        in one step.
........
  r118360 | geoffk | 2006-10-31 21:06:12 -0800 (Tue, 31 Oct 2006) | 23 lines

  In gcc/:
        * coverage.c (coverage_checksum_string): Update comment.
        * dwarf2out.c (switch_to_eh_frame_section): Update for removal
        of get_file_function_name.
        * cgraphunit.c (cgraph_build_static_cdtor): Update for rename
        of get_file_function_name_long.
        * tree.c (get_file_function_name): Rename from
        get_file_function_name_long; improve comment; handle 'I' and 'D'
        specially when the target has ctor/dtor support; remove special
        handling for 'F'.
        (get_file_function_name): Remove.
        * tree.h (get_file_function_name): Rename from
          get_file_function_name_long.
        (get_file_function_name): Remove prototype.
  In gcc/cp/:
        * name-lookup.c (get_anonymous_namespace_name): New.
        (push_namespace_with_attribs): Use get_anonymous_namespace_name.
        * decl2.c (start_objects): Update for rename of
        get_file_function_name_long.
  In gcc/fortran/:
        * trans-decl.c (gfc_generate_constructors): Update for removal
        of get_file_function_name.
........
  r118361 | geoffk | 2006-10-31 21:14:40 -0800 (Tue, 31 Oct 2006) | 49 lines

  2006-09-07  Eric Christopher  <echristo@apple.com>
            Falk Hueffner  <falk@debian.org>

        * doc/extend.texi (__builtin_bswap32): Document.
        (__builtin_bswap64): Ditto.
        * doc/libgcc.texi (bswapsi2): Document.
        (bswapdi2): Ditto.
        * doc/rtl.texi (bswap): Document.
        * optabs.c (expand_unop): Don't widen a bswap.
        (init_optabs): Init bswap. Set libfuncs explicitly
        for bswapsi2 and bswapdi2.
        * optabs.h (OTI_bswap): New.
        (bswap_optab): Ditto.
        * genopinit.c (optabs): Handle bswap_optab.
        * tree.h (tree_index): Add TI_UINT32_TYPE and
        TI_UINT64_TYPE.
        (uint32_type_node): New.
        (uint64_type_node): Ditto.
        * tree.c (build_common_tree_nodes_2): Initialize
        uint32_type_node and uint64_type_node.
        * builtins.c (expand_builtin_bswap): New.
        (expand_builtin): Call.
        (fold_builtin_bswap): New.
        (fold_builtin_1): Call.
        * fold-const.c (tree_expr_nonnegative_p): Return true
        for bswap.
        * builtin-types.def (BT_UINT32): New.
        (BT_UINT64): Ditto.
        (BT_FN_UINT32_UINT32): Ditto.
        (BT_FN_UINT64_UINT64): Ditto.
        * builtins.def (BUILT_IN_BSWAP32): New.
        (BUILT_IN_BSWAP64): Ditto.
        * rtl.def (BSWAP): New.
        * genattrtab.c (check_attr_value): New.
        * libgcc2.c (__bswapSI2): New.
        (__bswapDI2): Ditto.
        * libgcc2.h (__bswapSI2): Declare.
        (__bswapDI2): Ditto.
        * mklibgcc.in (lib2funcs): Add _bswapsi2 and _bswapdi2.
        * simplify-rtx.c (simplify_const_unary_operation): Return
        0 for BSWAP.
        * libgcc-std.ver (__bwapsi2): Add.
        (__bswapdi2): Ditto.
        * reload1.c (eliminate_regs_1): Add bswap.
        (elimination_effects): Ditto.
        * config/i386/i386.h (x86_bswap): New.
        (TARGET_BSWAP): Use.
        * config/i386/i386.c (x86_bswap): Set.
........
  r118362 | geoffk | 2006-10-31 21:16:14 -0800 (Tue, 31 Oct 2006) | 12 lines

  In gcc/:
        * toplev.c (compile_file): Call final_write_globals
        even if there have been errors.
  In gcc/cp/:
        * decl2.c (cp_write_global_declarations): Rename from
        cp_finish_file.
        * cp-lang.c (finish_file): Don't call cp_finish_file.
        * cp-tree.h (cp_write_global_declarations): Rename from
        cp_finish_file.
        * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
        cp_write_global_declarations.
........
  r118363 | geoffk | 2006-10-31 21:17:14 -0800 (Tue, 31 Oct 2006) | 1 line

  Add missing genopinit.c change for revision 118361.
........
  r118364 | geoffk | 2006-10-31 21:20:05 -0800 (Tue, 31 Oct 2006) | 10 lines

  2006-10-31  Eric Christopher  <echristo@apple.com>
            Falk Hueffner  <falk@debian.org>

        * gcc.dg/builtin-bswap-1.c: New.
        * gcc.dg/builtin-bswap-2.c: New.
        * gcc.dg/builtin-bswap-3.c: New.
        * gcc.dg/builtin-bswap-4.c: New.
        * gcc.dg/builtin-bswap-5.c: New.
        * gcc.target/i386/builtin-bswap-1.c: New.
........
  r118365 | geoffk | 2006-10-31 21:28:41 -0800 (Tue, 31 Oct 2006) | 28 lines

  In gcc/:
        PR 23067
        * c-decl.c (start_struct): Don't create self-containing
        structures.
        * config/rs6000/rs6000.c (darwin_rs6000_special_round_type_align):
        New.
        * config/rs6000/rs6000-protos.h
        (darwin_rs6000_special_round_type_align): New.
        * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Rewrite.
        (ROUND_TYPE_ALIGN): Use darwin_rs6000_special_round_type_align.
  In gcc/testsuite/:
        PR 23067
        * gcc.target/powerpc/darwin-abi-3.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-6.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-7.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-8.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-9.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-10.c: Remove XFAIL.
        * gcc.target/powerpc/darwin-abi-11.c: Remove XFAIL.
  In libobjc/:
        * encoding.c (darwin_rs6000_special_round_type_align): New.
  In libffi/:
        * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
        (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
        Darwin.
        * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
        * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
........
  r118366 | ghazi | 2006-10-31 21:38:21 -0800 (Tue, 31 Oct 2006) | 7 lines

        * builtins.def (gamma, lgamma): Use ATTR_MATHFN_FPROUNDING_STORE.

  testsuite:
        * gcc.dg/torture/builtin-attr-1.c: Don't test gamma/lgamma.
        * gcc.dg/torture/builtin-convert-1.c: Don't test lgamma.
........
  r118367 | geoffk | 2006-10-31 21:42:01 -0800 (Tue, 31 Oct 2006) | 1 line

  Fix date on ChangeLog entry
........
  r118371 | dannysmith | 2006-10-31 22:23:12 -0800 (Tue, 31 Oct 2006) | 22
lines

        * target.h (targetm.cxx.use_atexit_for_cxa_atexit): New target
        hook.
        * target-def.h: (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Define
        default.
        * config/i386/mingw32.h (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT):
        Override default.
        * doc/tm.texi (TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT): Document.
        * configure.ac (use_cxa_atexit): As a special case, don't test
        for libc definition of __cxa_atexit on mingw32
        * configure: Regenerate.
        * config.gcc (i[34567]86-pc-mingw32): Default to
        enable__cxa_atexit=yes.

  cp

        * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
        if targetm.cxx.use_atexit_for cxa_atexit.
        (start_cleanup_fn): Likewise.
        (register_dtor_fn): Likewise.
........
  r118372 | pinskia | 2006-10-31 23:28:53 -0800 (Tue, 31 Oct 2006) | 7 lines

  2006-10-31  Andrew Pinski  <pinskia@gmail.com>

          * doc/invoke.texi (-fkeep-inline-functions): Change "GNU C"
          to "GNU C89".
........
  r118373 | rguenth | 2006-11-01 03:38:06 -0800 (Wed, 01 Nov 2006) | 10 lines

  2006-11-01  Richard Guenther  <rguenther@suse.de>

        * config/i386/i386.c (ix86_expand_rint): Fix issues with
        signed zeros.
        (ix86_expand_floorceildf_32): Likewise.
        (ix86_expand_floorceil): Likewise.
        (ix86_expand_trunc): Likewise.

        * testsuite/gcc.target/i386/fpprec-1.c: New testcase.
........
  r118374 | ebotcazou | 2006-11-01 03:58:18 -0800 (Wed, 01 Nov 2006) | 1 line

  Fix asm string.
........
  r118377 | ebotcazou | 2006-11-01 04:09:25 -0800 (Wed, 01 Nov 2006) | 3 lines

        * gcc.c-torture/execute/20061101-1.c: New test.
........

Modified:
    branches/fixed-point/   (props changed)
    branches/fixed-point/fixincludes/ChangeLog
    branches/fixed-point/fixincludes/fixincl.x
    branches/fixed-point/fixincludes/inclhack.def
    branches/fixed-point/gcc/ChangeLog
    branches/fixed-point/gcc/DATESTAMP
    branches/fixed-point/gcc/ada/ChangeLog
    branches/fixed-point/gcc/ada/a-rbtgso.ads
    branches/fixed-point/gcc/builtin-types.def
    branches/fixed-point/gcc/builtins.c
    branches/fixed-point/gcc/builtins.def
    branches/fixed-point/gcc/c-decl.c
    branches/fixed-point/gcc/c-tree.h
    branches/fixed-point/gcc/c-typeck.c
    branches/fixed-point/gcc/cgraphunit.c
    branches/fixed-point/gcc/config.gcc
    branches/fixed-point/gcc/config/darwin.h
    branches/fixed-point/gcc/config/i386/darwin.h
    branches/fixed-point/gcc/config/i386/i386.c
    branches/fixed-point/gcc/config/i386/i386.h
    branches/fixed-point/gcc/config/i386/mingw32.h
    branches/fixed-point/gcc/config/rs6000/darwin.h
    branches/fixed-point/gcc/config/rs6000/rs6000-protos.h
    branches/fixed-point/gcc/config/rs6000/rs6000.c
    branches/fixed-point/gcc/configure
    branches/fixed-point/gcc/configure.ac
    branches/fixed-point/gcc/coverage.c
    branches/fixed-point/gcc/cp/ChangeLog
    branches/fixed-point/gcc/cp/cp-lang.c
    branches/fixed-point/gcc/cp/cp-objcp-common.h
    branches/fixed-point/gcc/cp/cp-tree.h
    branches/fixed-point/gcc/cp/decl.c
    branches/fixed-point/gcc/cp/decl2.c
    branches/fixed-point/gcc/cp/name-lookup.c
    branches/fixed-point/gcc/doc/extend.texi
    branches/fixed-point/gcc/doc/invoke.texi
    branches/fixed-point/gcc/doc/libgcc.texi
    branches/fixed-point/gcc/doc/rtl.texi
    branches/fixed-point/gcc/doc/tm.texi
    branches/fixed-point/gcc/dwarf2out.c
    branches/fixed-point/gcc/fold-const.c
    branches/fixed-point/gcc/fortran/ChangeLog
    branches/fixed-point/gcc/fortran/data.c
    branches/fixed-point/gcc/fortran/decl.c
    branches/fixed-point/gcc/fortran/expr.c
    branches/fixed-point/gcc/fortran/match.c
    branches/fixed-point/gcc/fortran/primary.c
    branches/fixed-point/gcc/fortran/trans-common.c
    branches/fixed-point/gcc/fortran/trans-decl.c
    branches/fixed-point/gcc/genattrtab.c
    branches/fixed-point/gcc/genopinit.c
    branches/fixed-point/gcc/libgcc-std.ver
    branches/fixed-point/gcc/libgcc2.c
    branches/fixed-point/gcc/libgcc2.h
    branches/fixed-point/gcc/mklibgcc.in
    branches/fixed-point/gcc/optabs.c
    branches/fixed-point/gcc/optabs.h
    branches/fixed-point/gcc/reload1.c
    branches/fixed-point/gcc/rtl.def
    branches/fixed-point/gcc/simplify-rtx.c
    branches/fixed-point/gcc/target-def.h
    branches/fixed-point/gcc/target.h
    branches/fixed-point/gcc/testsuite/ChangeLog
    branches/fixed-point/gcc/testsuite/gcc.dg/inline-10.c
    branches/fixed-point/gcc/testsuite/gcc.dg/torture/builtin-attr-1.c
    branches/fixed-point/gcc/testsuite/gcc.dg/torture/builtin-convert-1.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-10.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-11.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-3.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-6.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-7.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-8.c
    branches/fixed-point/gcc/testsuite/gcc.target/powerpc/darwin-abi-9.c
    branches/fixed-point/gcc/testsuite/gfortran.dg/blockdata_1.f90
    branches/fixed-point/gcc/toplev.c
    branches/fixed-point/gcc/tree.c
    branches/fixed-point/gcc/tree.h
    branches/fixed-point/libffi/ChangeLog
    branches/fixed-point/libffi/src/powerpc/ffi_darwin.c
    branches/fixed-point/libffi/testsuite/libffi.call/nested_struct4.c
    branches/fixed-point/libffi/testsuite/libffi.call/nested_struct6.c
    branches/fixed-point/libgfortran/ChangeLog
    branches/fixed-point/libgfortran/io/transfer.c
    branches/fixed-point/libgfortran/libgfortran.h
    branches/fixed-point/libgfortran/runtime/error.c
    branches/fixed-point/libobjc/ChangeLog
    branches/fixed-point/libobjc/encoding.c

Propchange: branches/fixed-point/
            ('svnmerge-integrated' modified)


-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (12 preceding siblings ...)
  2005-07-26 18:02 ` sabre at nondot dot org
@ 2005-07-27 15:51 ` dje at gcc dot gnu dot org
  13 siblings, 0 replies; 31+ messages in thread
From: dje at gcc dot gnu dot org @ 2005-07-27 15:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dje at gcc dot gnu dot org  2005-07-27 15:48 -------
The AIX and PowerOpen ABIs specify doubleword alignment for long long ints in
32-bit mode and FSF GCC always has implemented this for all AIX-derived ABIs.

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (11 preceding siblings ...)
  2005-07-26 17:46 ` pinskia at gcc dot gnu dot org
@ 2005-07-26 18:02 ` sabre at nondot dot org
  2005-07-27 15:51 ` dje at gcc dot gnu dot org
  13 siblings, 0 replies; 31+ messages in thread
From: sabre at nondot dot org @ 2005-07-26 18:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sabre at nondot dot org  2005-07-26 17:46 -------
Corrected patch:
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01736.html

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (10 preceding siblings ...)
  2005-07-26 17:38 ` pinskia at gcc dot gnu dot org
@ 2005-07-26 17:46 ` pinskia at gcc dot gnu dot org
  2005-07-26 18:02 ` sabre at nondot dot org
  2005-07-27 15:51 ` dje at gcc dot gnu dot org
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 17:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 17:42 -------
Also the patch needs a testcase or two.
For an example:
/* { dg-do compile { powerpc*-darwin* } } */
struct f
{
  long long ll;
  int i;
};

int f[sizeof(struct f)!=16?-1:1];
-------

/* { dg-do compile { powerpc*-darwin* } } */
struct f
{
  int i;
  long long ll;
};

int f[sizeof(struct f)!=12?-1:1];

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (9 preceding siblings ...)
  2005-07-26 17:36 ` sabre at nondot dot org
@ 2005-07-26 17:38 ` pinskia at gcc dot gnu dot org
  2005-07-26 17:46 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 17:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 17:37 -------
Patch does not get the following correct:
struct f
{
  long long i;
  int j;
};

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (8 preceding siblings ...)
  2005-07-26 13:14 ` pinskia at gcc dot gnu dot org
@ 2005-07-26 17:36 ` sabre at nondot dot org
  2005-07-26 17:38 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: sabre at nondot dot org @ 2005-07-26 17:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sabre at nondot dot org  2005-07-26 17:35 -------
Potential patch:
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01732.html

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (7 preceding siblings ...)
  2005-07-26  5:25 ` sabre at nondot dot org
@ 2005-07-26 13:14 ` pinskia at gcc dot gnu dot org
  2005-07-26 17:36 ` sabre at nondot dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26 13:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 13:14 -------
Confirmed based on what Apple's GCC does and what Geoff said.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-26 13:14:41
               date|                            |


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (6 preceding siblings ...)
  2005-07-26  3:26 ` geoffk at gcc dot gnu dot org
@ 2005-07-26  5:25 ` sabre at nondot dot org
  2005-07-26 13:14 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: sabre at nondot dot org @ 2005-07-26  5:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sabre at nondot dot org  2005-07-26 04:49 -------
The ABI clearly states that the maximum alignment for non-initial structure
elements is 32-bits.

-Chris

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (5 preceding siblings ...)
  2005-07-26  3:17 ` pinskia at gcc dot gnu dot org
@ 2005-07-26  3:26 ` geoffk at gcc dot gnu dot org
  2005-07-26  5:25 ` sabre at nondot dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2005-07-26  3:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From geoffk at gcc dot gnu dot org  2005-07-26 03:17 -------
Doesn't matter if the printed docs differ; Apple's GCC sets the ABI for Darwin.

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (4 preceding siblings ...)
  2005-07-26  2:36 ` pinskia at gcc dot gnu dot org
@ 2005-07-26  3:17 ` pinskia at gcc dot gnu dot org
  2005-07-26  3:26 ` geoffk at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  3:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:36 -------
Looks like the ABI in darwin.h is just a copy of the one in aix.h which might mean this was on purpose 
and Apple's GCC is wrong.

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (3 preceding siblings ...)
  2005-07-26  2:32 ` pinskia at gcc dot gnu dot org
@ 2005-07-26  2:36 ` pinskia at gcc dot gnu dot org
  2005-07-26  3:17 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  2:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:32 -------
The comment in darwin.h seems to contradict what is here:
/* Darwin word-aligns FP doubles but doubleword-aligns 64-bit ints.  */
/* Darwin increases natural record alignment to doubleword if the first
   field is an FP double while the FP fields remain word aligned.  */

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
                   ` (2 preceding siblings ...)
  2005-07-26  2:29 ` pinskia at gcc dot gnu dot org
@ 2005-07-26  2:32 ` pinskia at gcc dot gnu dot org
  2005-07-26  2:36 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  2:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:29 -------
The ABI is here:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/PowerPCRuntime/Data/
chapter_2_section_3.html#//apple_ref/doc/uid/TP40001520-CH210-BCIFEEFG

-- 


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
  2005-07-26  2:15 ` [Bug target/23067] " pinskia at gcc dot gnu dot org
  2005-07-26  2:28 ` pinskia at gcc dot gnu dot org
@ 2005-07-26  2:29 ` pinskia at gcc dot gnu dot org
  2005-07-26  2:32 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  2:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:27 -------
FSF's gcc has always got this wrong.  Apple's 3.3 gcc got this right.  I don't know what is correct or not.

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


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
  2005-07-26  2:15 ` [Bug target/23067] " pinskia at gcc dot gnu dot org
@ 2005-07-26  2:28 ` pinskia at gcc dot gnu dot org
  2005-07-26  2:29 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  2:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:15 -------
Not a regression in FSF's gcc.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
      Known to fail|                            |3.3.3 3.4.0 4.0.0 4.1.0


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


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

* [Bug target/23067] Incorrect struct layout on darwin
  2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
@ 2005-07-26  2:15 ` pinskia at gcc dot gnu dot org
  2005-07-26  2:28 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-26  2:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-26 02:07 -------
I don't think the ABI says this.  I think it only mentions double.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |target
           Keywords|                            |ABI


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


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

end of thread, other threads:[~2006-11-30 19:26 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23067-6809@http.gcc.gnu.org/bugzilla/>
2005-10-04  2:43 ` [Bug target/23067] Incorrect struct layout on darwin pinskia at gcc dot gnu dot org
2005-10-04  3:05 ` pinskia at gcc dot gnu dot org
2005-10-04 19:49 ` pinskia at gcc dot gnu dot org
2005-10-05 15:06 ` pinskia at gcc dot gnu dot org
2005-10-05 15:21 ` pinskia at gcc dot gnu dot org
2005-10-06 18:37 ` pinskia at gcc dot gnu dot org
2005-10-06 18:40 ` pinskia at gcc dot gnu dot org
2005-12-14  2:50 ` pinskia at gcc dot gnu dot org
2005-12-14 20:10 ` pinskia at gcc dot gnu dot org
2005-12-31 22:21 ` pinskia at gcc dot gnu dot org
2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
2006-10-16 21:47 ` geoffk at gcc dot gnu dot org
2006-10-16 21:54 ` geoffk at gcc dot gnu dot org
2006-11-01  5:28 ` geoffk at gcc dot gnu dot org
2006-11-01  5:33 ` pinskia at gcc dot gnu dot org
2006-11-01  5:39 ` geoffk at gcc dot gnu dot org
2006-11-30 19:26 ` chaoyingfu at gcc dot gnu dot org
2005-07-26  2:07 [Bug c/23067] New: " sabre at nondot dot org
2005-07-26  2:15 ` [Bug target/23067] " pinskia at gcc dot gnu dot org
2005-07-26  2:28 ` pinskia at gcc dot gnu dot org
2005-07-26  2:29 ` pinskia at gcc dot gnu dot org
2005-07-26  2:32 ` pinskia at gcc dot gnu dot org
2005-07-26  2:36 ` pinskia at gcc dot gnu dot org
2005-07-26  3:17 ` pinskia at gcc dot gnu dot org
2005-07-26  3:26 ` geoffk at gcc dot gnu dot org
2005-07-26  5:25 ` sabre at nondot dot org
2005-07-26 13:14 ` pinskia at gcc dot gnu dot org
2005-07-26 17:36 ` sabre at nondot dot org
2005-07-26 17:38 ` pinskia at gcc dot gnu dot org
2005-07-26 17:46 ` pinskia at gcc dot gnu dot org
2005-07-26 18:02 ` sabre at nondot dot org
2005-07-27 15:51 ` dje 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).