Bug 346487

Summary: Compiler generates "note" about a future ABI change for PPC64
Product: [Developer tools] valgrind Reporter: Carl Love <cel>
Component: generalAssignee: Julian Seward <jseward>
Status: CLOSED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.10.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to change passing the 128-bit args from pass-by-value to pass-by-reference

Description Carl Love 2015-04-22 20:56:49 UTC
The gcc compiler version 4.8 generates the following message.

test_dfp4.c: In function ‘_test_dtstdgq’:
test_dfp4.c:249:13: note: the ABI of passing aggregates with 16-byte alignment will change in a future GCC release
 static void _test_dtstdgq(int BF, int DGM, dfp_val_t val1, dfp_val_t x1 __attribute__((unused)))
             ^
The issue is with the alignment of the 128 bit values being passed as function arguments.  The alignment of these arguments will change in gcc version 5.0.  

The message is not an issue as long as all of the code is compiled with the same version of the compiler.  The issue will be if you link object files compiled with different versions of the compiler, the alignment will not be correct.

The note is not an issue for the Valgrind test cases but would like to avoid having the notice generated.

Reproducible: Always

Steps to Reproduce:
1. Compile the Valgrind PPC64 test cases with gcc 4.8 or newer
2.
3.

Actual Results:  
Just generates a notice.
Comment 1 Carl Love 2015-04-22 21:23:30 UTC
Created attachment 92171 [details]
Patch to change passing the 128-bit args from pass-by-value to pass-by-reference

The attached patch changes the PPC64 regression tests test_dfp4.c and  test_dfp5.c.  The functions that passed 128-bit arguments by value were changed to pass the arguments by reference so the compiler will not generate a warning about a future ABI change.  The 5.0 version of the gcc compiler will be changing the alignment for 128-bit arguments.