This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/39545: structures with zero-length array passed/returned inconsistently


On Tue, Mar 24, 2009 at 4:35 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> On Tue, Mar 24, 2009 at 02:20:10PM -0700, H.J. Lu wrote:
>> On Tue, Mar 24, 2009 at 12:25:05PM -0700, H.J. Lu wrote:
>> > Since flexible array member in struct is ignored when passing and
>> > returning, we should never count it. ?This patch fixes it with an ABI
>> > change warning. If it is OK, I will provide a few testcase.
>> >
>>
>> Here is the updated patch with testcases. ?I am testing it on
>> Linux/Intel64. ?OK for trunk if there are no regressions?
>
> There are a few regressions:
>
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O0 ?(internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O0 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O1 ?(internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O1 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O2 ?(internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O2 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O3 -fomit-frame-pointer (internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O3 -fomit-frame-pointer (test for excess errors)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O3 -g ?(internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-O3 -g ?(test for excess errors)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-Os ?(internal compiler error)
> FAIL: gcc.c-torture/compile/20010605-1.c ?-Os ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-O0 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-O1 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-O2 ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-O3 -fomit-frame-pointer ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-O3 -g ?(test for excess errors)
> FAIL: gcc.c-torture/compile/pr16566-2.c ?-Os ?(test for excess errors)
>
> This updated patch properly checks flexible array member in struct.
> It also updated gcc.c-torture/compile/pr16566-2.c. ?I am testing it
> on Linux/Intel64. ?OK for trunk if there are no regressions?
>
> Thanks.
>
>
> H.J.
> ---
> gcc/
>
> 2009-03-24 ?H.J. Lu ?<hongjiu.lu@intel.com>
>
> ? ? ? ?PR target/39545
> ? ? ? ?* config/i386/i386.c (classify_argument): Ignore flexible array
> ? ? ? ?member in struct and warn ABI change.
>
> gcc/testsuite/
>
> 2009-03-24 ?H.J. Lu ?<hongjiu.lu@intel.com>
>
> ? ? ? ?PR target/39545
> ? ? ? ?* gcc.c-torture/compile/pr16566-2.c: Add -Wno-psabi for x86-64.
>
> ? ? ? ?* gcc.target/i386/pr39545-1.c: New.
> ? ? ? ?* gcc.target/i386/pr39545-2.c: Likewise.
>
> ? ? ? ?* gcc.target/x86_64/abi/test_passing_structs.c (flex1_struct): New.
> ? ? ? ?(flex2_struct): Likewise.
> ? ? ? ?(check_struct_passing7): Likewise.
> ? ? ? ?(check_struct_passing8): Likewise.
> ? ? ? ?(f1s): Likewise.
> ? ? ? ?(f2s): Likewise.
> ? ? ? ?(main): Call check_struct_passing7 and check_struct_passing8.
>

There are no regressions on Linux/Intel64.  OK for trunk?

Thanks.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]