This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: GCC Testsuite: Annotate compile tests that need at least 32-bit pointers/integers
- From: Mike Stump <mikestump at comcast dot net>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 30 Sep 2013 12:42:15 -0700
- Subject: Re: RFA: GCC Testsuite: Annotate compile tests that need at least 32-bit pointers/integers
- Authentication-results: sourceware.org; auth=none
- References: <874n924ce2 dot fsf at redhat dot com>
On Sep 30, 2013, at 7:23 AM, Nick Clifton <nickc@redhat.com> wrote:
> Several tests in the gcc.c-torture/compile directory need a target
> with 32-bit integers and/or 32-bit pointers.
> OK to apply ?
Ok.
It may be reasonable to special case ptr32plus to say no on your platform, from check_effective_target_tls_native, we see code like:
proc check_effective_target_tls_native {} {
# VxWorks uses emulated TLS machinery, but with non-standard helper
# functions, so we fail to automatically detect it.
if { [istarget *-*-vxworks*] } {
return 0
}
return [check_no_messages_and_pattern tls_native "!emutls" assembly {
__thread int i;
int f (void) { return i; }
void g (int j) { i = j; }
}]
}
so, instead of:
proc check_effective_target_ptr32plus { } {
return [check_no_compiler_messages ptr32plus object {
int dummy[sizeof (void *) >= 4 ? 1 : -1];
}]
}
you could do something like:
proc check_effective_target_ptr32plus { } {
# msp430 never really has 32 or more bits in a pointer.
if { [istarget msp430-*-*] } {
return 0
}
return [check_no_compiler_messages ptr32plus object {
int dummy[sizeof (void *) >= 4 ? 1 : -1];
}]
}
Then, you don't have to worry about people adding tests with this predicate and those test cases failing. I don't have a good handle on wether this is better or not, so, I'll let you decide what you think is best.