Mike Stump wrote: > On Jan 13, 2012, at 9:23 AM, Rainer Orth wrote: >> Mike Stump <mikest...@comcast.net> writes: >> >>> On Jan 13, 2012, at 4:33 AM, Georg-Johann Lay wrote: >>>> This test case is obviously written for 32-bit platforms, thus added >>>> "dg-require-effective-target ilp32" to ensure that the pointer mess won't >>>> lead >>>> to FAILs because of >>>> >>>> warning: cast to pointer from integer of different size >>>> >>>> and >>>> >>>> warning: cast from pointer to integer of different size >>>> >>>> Ok to apply? >>> Ok. >>> >>>> * gcc.dg/lto/20091013-1_0.c: Add dg-require-effective-target ilp32. >> I wonder if the fix is right, though: the testcase currenly passes for >> 64-bit multilibs, but won't run there any longer if the patch is >> applied. > > I rely upon words like obviously written for 32-bit platforms a little too > much apparently, sorry. I agree, let's find some other solution. I've > starred at the code, and is was not clear to me why you thought it was > obviously for 32-bit platforms. > > So, I'd propose the -Wno- option silence the warning... Seem reasonable to > people, if so, Ok.
The ilp32 is the closes match: The source casts pointer to int, int to pointer, long to int, uses 32-bit initializers for int, assumes size_t is unsigned long any maybe others. Test cases like these are a permanent annoyance. There are hundreds of test cases that are not properly written or reviewed or gated by dg-require-foo. I wonder why such test cases go into the test suite in the first place if the come with such bunch of implications. Most of the test cases run on *all* targets that GCC claims to support. Johann