This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR68067


On 28/10/15 13:38, Richard Biener wrote:

Applied as follows.

Bootstrapped / tested on x86_64-unknown-linux-gnu.

Richard.

2015-10-28  Richard Biener  <rguenther@suse.de>

	* fold-const.c (negate_expr_p): Adjust the division case to
	properly avoid introducing undefined overflow.
	(fold_negate_expr): Likewise.

Since this we've been seeing an ICE compiling polynom.c from 254.gap in SPEC2000 on aarch64-linux-gnu with -O3 -ffast-math -mcpu=cortex-a53 (or -Ofast -mcpu=cortex-a53), on both native (bootstrapped and --disable-bootstrap) and cross-linux builds.

A number of options prevent the ICE, e.g. any of -fno-thread-jumps, -fno-strict-overflow, -fdump-tree-alias or -fdump-tree-ealias (!). Similarly, dropping the -mcpu=cortex-a53, or changing to -mcpu=cortex-a57.

(I have a recent build in a chroot for which -fno-strict-overflow does *not* fix the ICE but haven't yet figured out exactly what the difference in the chroot environment is.)

Moreover, preprocessing in a separate step (i.e. piping preprocessed output via a file with -E), also avoids the ICE. (This is hindering my efforts to reduce the testcase!). So my hypothesis is that this is a front-end/preprocessor bug, rather than anything directly due to this commit.

The error message in full (line refs from that commit, r229479) is:
=====
../spec2000/benchspec/CINT2000/254.gap/src/polynom.c: In function ‘NormalizeCoeffsListx’: ../spec2000/benchspec/CINT2000/254.gap/src/polynom.c:358:11: error: incompatible types in PHI argument 0
 TypHandle NormalizeCoeffsListx ( hdC )
           ^
long int

int

../spec2000/benchspec/CINT2000/254.gap/src/polynom.c:358:11: error: location references block not in block tree
l1_279 = PHI <1(28), l1_299(33)>
../spec2000/benchspec/CINT2000/254.gap/src/polynom.c:358:11: error: invalid PHI argument

../spec2000/benchspec/CINT2000/254.gap/src/polynom.c:358:11: internal compiler error: tree check: expected class ‘type’, have ‘declaration’ (namespace_decl) in useless_type_conversion_p, at gimple-expr.c:84 0xd110ef tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*)
        ../../gcc-fsf/gcc/tree.c:9643
0x82561b tree_class_check
        ../../gcc-fsf/gcc/tree.h:3042
0x82561b useless_type_conversion_p(tree_node*, tree_node*)
        ../../gcc-fsf/gcc/gimple-expr.c:84
0xaca043 verify_gimple_phi
        ../../gcc-fsf/gcc/tree-cfg.c:4673
0xaca043 verify_gimple_in_cfg(function*, bool)
        ../../gcc-fsf/gcc/tree-cfg.c:4967
0x9c2e0b execute_function_todo
        ../../gcc-fsf/gcc/passes.c:1967
0x9c360b do_per_function
        ../../gcc-fsf/gcc/passes.c:1659
0x9c3807 execute_todo
        ../../gcc-fsf/gcc/passes.c:2022
Please submit a full bug report,
with preprocessed source if appropriate.
=====
which looks like an "incompatible types from PHI argument" from a first call to verify_gimple_phi, then a second call to verify_gimple_phi prints "invalid phi argument" and ICEs in the test just before possibly printing a second incompatible_types message.


--Alan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]