RE: M4 tests fail when built with PGI compilers

2017-01-31 Thread Stewart, Adam James
Thanks Paul,

Yes, the warnings are annoying, but more importantly, `make check` doesn't pass 
for me. In fact, I'm not sure if it even gets to the testing phase. I think it 
crashes when trying to build the test suite.

I am also passing "--enable-c++" and "--with-libsigsegv=/path/to/libsigsegv" to 
configure, if that makes a difference. I'm also building it in a different 
directory than the one containing the configure script. I have attached my 
build output to help you debug the problem.

Adam J. Stewart
Assistant Systems Administrator
Laboratory Computing Resource Center
Computing, Environment and Life Sciences
Argonne National Laboratory


From: Paul Eggert [egg...@cs.ucla.edu]
Sent: Monday, January 30, 2017 8:44 PM
To: Stewart, Adam James
Cc: Eric Blake; bug-m4@gnu.org; Bug-gnulib
Subject: Re: M4 tests fail when built with PGI compilers

On 01/30/2017 02:39 PM, Eric Blake wrote:
>
>> I don't think test-intprops.c is compatible with the PGI compilers.

Yes, test-intprops.c runs afoul of a problem in the PGI compiler. I can
reproduce the problem in PGI 16.10 x86-64 by compiling this one-line
program:

   short bar = -32768 <= 10 && 10 <= 32767  ? (short) 10 : 0;

Although this is valid C code and is well-defined to initialize 'bar' to
0 on x86-64, pgcc warns "Constant value out of range for signed short or
char". Since the expression "(short) 10" is not evaluated, the
warning is bogus. Although PGI generates thousands of similar warnings
for test-intprops.c, I expect that they are all bogus and that you can
ignore them. As 'make check' does not fail and I don't see an easy way
to suppress the bogus warnings, I suspect we ought to leave the code alone.

Admittedly these warnings are annoying. Adam, since you're a PGI user,
perhaps you could report the compiler bug or bugs to the PGI maintainers.

While I was at it, I looked at the other warnings that PGI generates for
GNU M4, and managed to silence most of the rest with this Gnulib patch:

http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=16f6a8d8d81cc93745a24c0fb89caab2c383ae3c

A half-dozen or so of the thousands of Gnulib warnings were actual
portability bugs in Gnulib, which made the exercise worth doing I
suppose. I don't think these bugs affect GNU M4.


m4-pgi.tar.gz
Description: m4-pgi.tar.gz


Re: M4 tests fail when built with PGI compilers

2017-01-31 Thread Paul Eggert

On 01/31/2017 07:46 AM, Stewart, Adam James wrote:

Yes, the warnings are annoying, but more importantly, `make check` doesn't pass 
for me. In fact, I'm not sure if it even gets to the testing phase. I think it 
crashes when trying to build the test suite.


Your log file says all the M4 tests passed; see the line "All checks 
successful". The tests that failed are all Gnulib tests that do not 
suggest any problems in M4 proper, only problems in the Gnulib test 
harness (plus one portability bug in Gnulib that M4 should not trigger). 
So you should be OK.


The Gnulib 'make check' failures are fixed by the patch I mentioned 
earlier, which should appear in the next version of GNU M4. Here it is 
again:


http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=16f6a8d8d81cc93745a24c0fb89caab2c383ae3c