https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102831
Bug ID: 102831
Summary: [12 regression] Spurious -Wparentheses etc. warnings
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Target: *-*-solaris2.11
Recently, Solaris bootstrap has repeatedly been broken in very confusing ways:
*
/vol/gcc/src/hg/master/local/gcc/lra-constraints.c: In function 'bool
curr_insn_transform(bool)':
/vol/gcc/src/hg/master/local/gcc/lra-constraints.c:4367:21: error: suggest
parentheses around assignment used as truth value [-Werror=parentheses]
4367 | (c = *constraint) && c != ',' && c != '#';
| ~~~^~~~~~~~~~~~~~
Solaris 11.4/SPARC, once 20211006, again 20211018
*
/vol/gcc/src/hg/master/local/libgomp/oacc-init.c:876:1: error: optimization
attribute on ‘acc_on_device’ follows definition but the attribute doesn’t match
[-Werror=attributes]
876 | {
| ^
/vol/gcc/src/hg/master/local/libgomp/oacc-init.c:875:1: note: previous
definition of ‘acc_on_device’ with type ‘int(acc_device_t)’
875 | acc_on_device (acc_device_t dev)
| ^~~~~~~~~~~~~
/vol/gcc/src/hg/master/local/libgomp/oacc-init.c:954:1: internal compiler
error: in dwarf2out_register_main_translation_unit, at dwarf2out.c:28329
954 | }
| ^
0x109240f dwarf2out_register_main_translation_unit
/vol/gcc/src/hg/master/local/gcc/dwarf2out.c:28328
0xc184b3 pop_scope()
/vol/gcc/src/hg/master/local/gcc/c/c-decl.c:1217
0xc19963 pop_file_scope()
/vol/gcc/src/hg/master/local/gcc/c/c-decl.c:1465
0xdf4be7 c_common_parse_file()
/vol/gcc/src/hg/master/local/gcc/c-family/c-opts.c:1238
Solaris 11.4/SPARC, 32 and 64-bit, 20211003
*
In file included from /vol/gcc/src/hg/master/local/gcc/sparseset.c:23:
/vol/gcc/src/hg/master/local/gcc/sparseset.c: In function 'void
sparseset_ior(sparseset, sparseset, sparseset)':
/vol/gcc/src/hg/master/local/gcc/sparseset.h:215:20: error: suggest parentheses
around assignment used as truth value [-Werror=parentheses]
215 | && (((ITER) = sparseset_iter_elm (SPARSESET)) || 1);
\
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/vol/gcc/src/hg/master/local/gcc/sparseset.c:214:7: note: in expansion of macro
'EXECUTE_IF_SET_IN_SPARSESET'
214 | EXECUTE_IF_SET_IN_SPARSESET (b, e)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Solaris 11.3, first SPARC, 20210924, then x86, 20211001, 20211015, probably
more
reghunts on sparc and x86 converged, but the results made no sense:
sparc as of 20210924 identified
commit 4e7a92c0ff3871d955ca8fb133f869b216d7224d
Author: Richard Earnshaw <[email protected]>
Date: Tue Sep 21 11:14:46 2021 +0100
arm: pass architecture extensions to assembler if supported
x86 as of 20211001 identified
commit a11052d98db2f2a61841f0c5ee84de4ca1b3e296
Author: Jonathan Wakely <[email protected]>
Date: Tue Sep 28 12:35:29 2021 +0100
libstdc++: Improve std::forward static assert message
This seems like some sort of memory corruption to me, but I'm a bit at a loss
on how to proceed.
When continuing the builds with adding -Wno-error=parentheses to the affected
files, the test results showed nothing unexpected.