public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct.
@ 2005-08-18 17:52 amylaar at gcc dot gnu dot org
  2005-08-18 17:55 ` [Bug middle-end/23467] " amylaar at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-08-18 17:52 UTC (permalink / raw)
  To: gcc-bugs

For STRICT_ALIGNMENT targets, the alignment of the mode of a struct
can override a larger alignment requirement from an aligned member.

-- 
           Summary: alignment of member doesn't always carry over to
                    alignment of struct.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: amylaar at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: any with STRICT_ALIGNMENT, e.g. sh-elf


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
@ 2005-08-18 17:55 ` amylaar at gcc dot gnu dot org
  2005-08-18 18:11 ` amylaar at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-08-18 17:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amylaar at gcc dot gnu dot org  2005-08-18 17:51 -------
Created an attachment (id=9533)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9533&action=view)
testcase

Although the size of s1 gets padded to 64 bits for sh-elf, its alignemnt
is set back to 32 bits, and hence m is not sufficiently aligned.

-- 


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
  2005-08-18 17:55 ` [Bug middle-end/23467] " amylaar at gcc dot gnu dot org
@ 2005-08-18 18:11 ` amylaar at gcc dot gnu dot org
  2005-08-19 12:23 ` amylaar at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-08-18 18:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amylaar at gcc dot gnu dot org  2005-08-18 17:54 -------
Created an attachment (id=9534)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9534&action=view)
proposed patch


-- 


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
  2005-08-18 17:55 ` [Bug middle-end/23467] " amylaar at gcc dot gnu dot org
  2005-08-18 18:11 ` amylaar at gcc dot gnu dot org
@ 2005-08-19 12:23 ` amylaar at gcc dot gnu dot org
  2005-08-19 13:27 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-08-19 12:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |08/msg01146.html
           Keywords|                            |patch


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-08-19 12:23 ` amylaar at gcc dot gnu dot org
@ 2005-08-19 13:27 ` pinskia at gcc dot gnu dot org
  2005-08-23 12:28 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-19 13:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-19 13:24 -------
Confirmed.  Do you know if this is a regression?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
 GCC target triplet|any with STRICT_ALIGNMENT,  |defined(STRICT_ALIGNMENT)
                   |e.g. sh-elf                 |
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-19 13:24:11
               date|                            |


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-08-19 13:27 ` pinskia at gcc dot gnu dot org
@ 2005-08-23 12:28 ` cvs-commit at gcc dot gnu dot org
  2005-08-23 12:36 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-23 12:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-23 12:27 -------
Subject: Bug 23467

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amylaar@gcc.gnu.org	2005-08-23 12:26:38

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/execute: pr23467.c 

Log message:
	gcc:
	PR middle-end/23467
	* stor-layout.c (finalize_type_size): Dont override
	existing alignment with a smaller alignment from the mode.
	testsuite:
	PR middle-end/23467
	* gcc.c-torture/execute/pr23467.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5952&r2=1.5953
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/pr23467.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-08-23 12:28 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-23 12:36 ` cvs-commit at gcc dot gnu dot org
  2005-08-23 12:47 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-23 12:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-23 12:28 -------
Subject: Bug 23467

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amylaar@gcc.gnu.org	2005-08-23 12:27:55

Modified files:
	gcc            : ChangeLog stor-layout.c 

Log message:
	gcc:
	PR middle-end/23467
	* stor-layout.c (finalize_type_size): Dont override
	existing alignment with a smaller alignment from the mode.
	testsuite:
	PR middle-end/23467
	* gcc.c-torture/execute/pr23467.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9806&r2=2.9807
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stor-layout.c.diff?cvsroot=gcc&r1=1.238&r2=1.239



-- 


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-08-23 12:36 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-23 12:47 ` pinskia at gcc dot gnu dot org
  2005-08-26 17:17 ` cvs-commit at gcc dot gnu dot org
  2005-08-30 15:35 ` amylaar at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23 12:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-23 12:45 -------
Fixed.

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


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-08-23 12:47 ` pinskia at gcc dot gnu dot org
@ 2005-08-26 17:17 ` cvs-commit at gcc dot gnu dot org
  2005-08-30 15:35 ` amylaar at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-26 17:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-26 17:17 -------
Subject: Bug 23467

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	amylaar@gcc.gnu.org	2005-08-26 17:17:06

Modified files:
	gcc            : ChangeLog stor-layout.c 

Log message:
	* stor-layout.c (finalize_type_size): Restore behaviour for
	non-aggregate types to the status quo ante of the patch for
	pr 23467.  Document why it matters.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9830&r2=2.9831
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stor-layout.c.diff?cvsroot=gcc&r1=1.239&r2=1.240



-- 


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


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

* [Bug middle-end/23467] alignment of member doesn't always carry over to alignment of struct.
  2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-08-26 17:17 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-30 15:35 ` amylaar at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-08-30 15:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amylaar at gcc dot gnu dot org  2005-08-30 15:28 -------
(In reply to comment #7)
> 	* stor-layout.c (finalize_type_size): Restore behaviour for
> 	non-aggregate types to the status quo ante of the patch for
> 	pr 23467.  Document why it matters.

Richard Henderson has replaced this with a patch to tree.c:
http://gcc.gnu.org/ml/gcc-regression/2005-08/msg00051.html

-- 


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


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

end of thread, other threads:[~2005-08-30 15:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-18 17:52 [Bug middle-end/23467] New: alignment of member doesn't always carry over to alignment of struct amylaar at gcc dot gnu dot org
2005-08-18 17:55 ` [Bug middle-end/23467] " amylaar at gcc dot gnu dot org
2005-08-18 18:11 ` amylaar at gcc dot gnu dot org
2005-08-19 12:23 ` amylaar at gcc dot gnu dot org
2005-08-19 13:27 ` pinskia at gcc dot gnu dot org
2005-08-23 12:28 ` cvs-commit at gcc dot gnu dot org
2005-08-23 12:36 ` cvs-commit at gcc dot gnu dot org
2005-08-23 12:47 ` pinskia at gcc dot gnu dot org
2005-08-26 17:17 ` cvs-commit at gcc dot gnu dot org
2005-08-30 15:35 ` amylaar 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).