GCC 4.8.5 compiler bug

William A. Mahaffey III wam at hiwaay.net
Tue Nov 17 15:27:30 UTC 2015



I have found & apparently isolated what looks like a compiler bug in 
(pkg-installed, box-stock) gcc48 under FreeBSD 9.3R, see attached. I 
also prepped a tarball w/ the files that produced the problem for me. Do 
I post that here or to GNU ? TIA & have a good one ....


-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.

-------------- next part --------------
[wam at devbox, utils, 9:24:17am] 770 % make
gcc48 -DNDEBUG -DUNDER_SCORE_SYS -DLOSE_GAMMAL -I../include -I../Properties -I../TEST -I../pre -I/usr/local/include  -march=opteron -mtune=opteron -O3 -fprefetch-loop-arrays -fopt-info-loop-optimized -march=opteron -mtune=opteron -DP64_BIT -c gauss.cpp
gauss.cpp: In function 'int testGauss(char*, int, uint)':
gauss.cpp:332:43: error: 'PrintdGM' was not declared in this scope
  PrintdGM (stderr, "A", A, FALSE, 10, N, N), PrintdA (stderr, "B", B, 10, N), fprintf (stderr, "\n"), fflush (NULL);
                                           ^
gauss.cpp:332:76: error: 'PrintdA' was not declared in this scope
  PrintdGM (stderr, "A", A, FALSE, 10, N, N), PrintdA (stderr, "B", B, 10, N), fprintf (stderr, "\n"), fflush (NULL);
                                                                            ^
gauss.cpp: In function 'int TestGaussCPP(char*, float, int, uint)':
gauss.cpp:342:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", 2, 2);
                                      ^
gauss.cpp:343:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", 2, 3);
                                      ^
gauss.cpp:344:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", 2, 4);
                                      ^
gauss.cpp:345:38: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", 2, 9);
                                      ^
gauss.cpp:346:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", chatty, 100);
                                             ^
gauss.cpp:347:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", chatty, 200);
                                             ^
gauss.cpp:348:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", chatty, 500);
                                             ^
gauss.cpp:349:46: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", chatty, 1000);
                                              ^
gauss.cpp:350:46: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     testGauss ("TestGauss(C++)", chatty, 2000);
                                              ^
*** [../lib/opteron/libutils.a] Error code 1 (continuing)
`usual' not remade because of errors.
1 error
[wam at devbox, utils, 9:24:22am] 771 % uname -a
FreeBSD devbox 9.3-RELEASE-p24 FreeBSD 9.3-RELEASE-p24 #0: Sat Aug 22 01:54:44 UTC 2015     root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
[wam at devbox, utils, 9:24:25am] 772 % gcc48 --version
gcc48 (FreeBSD Ports Collection) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[wam at devbox, utils, 9:24:27am] 773 %


More information about the freebsd-toolchain mailing list