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] Fix PR60930


On Thu, Apr 24, 2014 at 09:20:50PM -0600, Jeff Law wrote:
> >	PR tree-optimization/60930
> >	* gcc.dg/torture/pr60930.c:  New test.
> Doesn't the test depend on long long being at least 64 bits?

But that is guaranteed by C99, isn't it?

5.2.4.2.1 says:

... Their implementation-defined values shall be equal or greater in magnitude
(absolute value) to those shown, with the same sign.
...
- maximum value for an object of type unsigned long long int ULLONG_MAX
  18446744073709551615 // 2 64 â 1
> 
> What we've done for these kinds of tests in the past is:
> 
> if (sizeof (whatever) < needed size)
>   exit (0);
> 
> Another approach would be to use an effective target test and skip
> the test if the target doesn't have a suitable long long.  Look  in
> testsuite/lib/target-supports.exp for the various target

If it was some other type, sure, one could use int32plus, lp64, etc.
target, or #if __SIZEOF_type__ == ...

	Jakub


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