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, rs6000, 4.8/4.9] Fix alignment of non-Altivec vector struct fields


Matthias Klose wrote:

> #define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) 0
> 
> is what succeeds for me. false is not defined for ObjC. Checked in on the trunk
> and the branches.

Since we didn't backport the actual ABI change to the branches, only the warning,
I think it would be consistent to use something like this on the branches:

#define rs6000_special_adjust_field_align_p(FIELD, COMPUTED) \
  (TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE)

rather than the #define ... 0 that is appropriate for mainline.

> these are still regressions, because the new warnings trigger on these test cases:
> 
> Running
> /home/doko/gcc/gcc-4.9-4.9.1/src/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
> ...
> FAIL: objc.dg-struct-layout-encoding-1/t025_main.m execution test
> FAIL: objc.dg-struct-layout-encoding-1/t027_main.m execution test
> FAIL: objc.dg-struct-layout-encoding-1/t028_main.m execution test
> FAIL: objc.dg-struct-layout-encoding-1/t029_main.m execution test
> FAIL: objc.dg-struct-layout-encoding-1/t030_main.m execution test
> FAIL: objc.dg-struct-layout-encoding-1/t031_main.m execution test

This is strange; I'm not seeing these test FAIL.  (I do see the warning in the
log, just as with the C and C++ tests, but the warning is filtered out by the
dejagnu scripts and doesn't cause failures).

However, I've been testing with the above version of the macro, not sure if
that explains the difference.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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