This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Test suite results what they mean and how to evaluate
- From: Mark Henwood <mhenwood at ieee dot org>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 10 Jan 2014 13:50:36 -0800 (PST)
- Subject: Re: Test suite results what they mean and how to evaluate
- Authentication-results: sourceware.org; auth=none
- References: <1389368974714-1001613 dot post at n5 dot nabble dot com> <CAKOQZ8ywUuJ7zb7kSRdqKz3CbpJGu0ZeKTZFDQDav8GA0AO6sA at mail dot gmail dot com>
Thanks Ian,
After looking at the mmap test the return was ERROR not FAILED and
apparently that is what was expected.
class T {
int i;
public:
T() {
i = 1;
printf("T() at %x\n", this);
}
T(const T& o) {
i = o.i;
printf("T(const T&) at %x <-- %x\n", this, &o);
}
T operator +(const T& o) {
T r;
r.i = this->i + o.i;
return r;
}
operator int () {
return i;
}
~T() { printf("~T() at %x\n", this); }
} s, b;
int foo() { return getenv("TEST") == 0; }
int main() {
printf("foo()=%d\n",foo());
int i = foo() ? s+b : s;
printf("i==%d\n",i);
return i != 2;
}
The temp.C -std=c++98 & -std=c++11 I don't really understand. I pulled
test.C out, compiled it with the info I pulled out of the logs, set the
LD_LIBRARY_PATH and ran it. The result is 2 when the TEST environment
variable is not set and 1 when it is (I added the printf statements to
main.)
This only leaves me with the question "What is this testing?"
I assumed it was a test to see if the compiler recognized some particular
syntax, but this code's output seems to be determined by the TEST
environment variable. Which the code does not check TEST before hand but
seems to expect it to be set. This may be valid for the expected
environment.
Mark
--
View this message in context: http://gcc.1065356.n5.nabble.com/Test-suite-results-what-they-mean-and-how-to-evaluate-tp1001613p1001742.html
Sent from the gcc - Help mailing list archive at Nabble.com.