* BIGGEST_ALIGNMENT vs g++ compat test expectation on aix ?
@ 2009-06-29 14:10 Olivier Hainque
2009-06-30 15:14 ` David Edelsohn
0 siblings, 1 reply; 3+ messages in thread
From: Olivier Hainque @ 2009-06-29 14:10 UTC (permalink / raw)
To: gcc; +Cc: hainque
Working on a collect2 related patch resubmission for ppc-aix, I
stumbled on regressions in the c++ series for a problem unrelated to
my change. Not sure how you'd typically deal with these, so providing
the datapoints here.
tmpdir-g++.dg-struct-layout-1/t027 and a couple of other tests failed
from constructs like
struct S2661 {
union{v16sf b[31];Tal2short c __attribute__((aligned (4)));}a;
float d;
};
struct S2661 s2661;
struct S2661 a2661[5];
info.als = __alignof__ (s2661);
if (&a2661[3] & (info.als - 1)) FAIL ...
the alignment check is up to that of v16sf (64bytes), and this
occasionaly fails because csects are "only" aligned in accordance with
rs6000.h:#define BIGGEST_ALIGNMENT 128
The discrepancy is visible straight from the assembly output
for e.g. t027_y (out of the unchanged compiler as well):
.csect .data[RW],4
^^^
.align 6
^^^
a2661:
.space 10240
Olivier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BIGGEST_ALIGNMENT vs g++ compat test expectation on aix ?
2009-06-29 14:10 BIGGEST_ALIGNMENT vs g++ compat test expectation on aix ? Olivier Hainque
@ 2009-06-30 15:14 ` David Edelsohn
2009-07-02 16:49 ` Olivier Hainque
0 siblings, 1 reply; 3+ messages in thread
From: David Edelsohn @ 2009-06-30 15:14 UTC (permalink / raw)
To: Olivier Hainque; +Cc: gcc
On Mon, Jun 29, 2009 at 9:59 AM, Olivier Hainque<hainque@adacore.com> wrote:
> Working on a collect2 related patch resubmission for ppc-aix, I
> stumbled on regressions in the c++ series for a problem unrelated to
> my change. Not sure how you'd typically deal with these, so providing
> the datapoints here.
>
> tmpdir-g++.dg-struct-layout-1/t027 and a couple of other tests failed
> from constructs like
>
> struct S2661 {
> union{v16sf b[31];Tal2short c __attribute__((aligned (4)));}a;
> float d;
> };
>
> struct S2661 s2661;
> struct S2661 a2661[5];
>
> info.als = __alignof__ (s2661);
> if (&a2661[3] & (info.als - 1)) FAIL ...
>
> the alignment check is up to that of v16sf (64bytes), and this
> occasionaly fails because csects are "only" aligned in accordance with
>
> rs6000.h:#define BIGGEST_ALIGNMENT 128
>
> The discrepancy is visible straight from the assembly output
> for e.g. t027_y (out of the unchanged compiler as well):
>
> .csect .data[RW],4
> ^^^
> .align 6
> ^^^
> a2661:
> .space 10240
The default alignment of CSECTs is 4, but using -fdata-sections should
place the object in its own CSECT with stricter alignment.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: BIGGEST_ALIGNMENT vs g++ compat test expectation on aix ?
2009-06-30 15:14 ` David Edelsohn
@ 2009-07-02 16:49 ` Olivier Hainque
0 siblings, 0 replies; 3+ messages in thread
From: Olivier Hainque @ 2009-07-02 16:49 UTC (permalink / raw)
To: David Edelsohn; +Cc: gcc, hainque
David Edelsohn wrote:
> > Â Â Â Â .csect .data[RW],4
> > Â Â Â Â Â Â Â Â Â Â Â Â ^^^
> > Â Â Â Â .align 6
> > Â Â Â Â Â Â Â ^^^
> > a2661:
> > Â Â Â Â .space 10240
>
> The default alignment of CSECTs is 4, but using -fdata-sections should
> place the object in its own CSECT with stricter alignment.
Humm, it apparently doesn't: I see no difference in the generated
assembly for t027_y.C.
Olivier
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-02 16:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 14:10 BIGGEST_ALIGNMENT vs g++ compat test expectation on aix ? Olivier Hainque
2009-06-30 15:14 ` David Edelsohn
2009-07-02 16:49 ` Olivier Hainque
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).