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]

proposed new dg-effective-target(s) for >= 32 bits


There are a number of test cases that assume sizeof(int) is *at least*
32 bits, and fail for 16 bit integers.  Same for small pointers or
small size_t.  One catch-all test would be to see if a target is
"ilp32" *or greater*:

# Return 1 if we're generating 32-bit or larger code using default
# options, 0 otherwise.

proc check_effective_target_ilp32plus { } {
    return [check_no_compiler_messages ilp32plus object {
	int dummy[sizeof (int) >= 4
		  && sizeof (void *) >= 4
		  && sizeof (long) >= 4 ? 1 : -1];
    }]
}

For more granularity, perhaps a set of tests:

	int32p	integers are 32 bits or more
	long32p	longs ...
	size32p	size_t ...
	ptr32p	pointers ...

I include "size_t" here because m32c, for example, has
sizeof(pointer)==4 but, really, it's only 24 bits, and array and
structure offsets are limited to 16 bits anyway.

I would like to start tagging testcases that don't run on 16 bit
platforms like the m32c, but first I need clear direction on which
tags to use.  Comments?


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