public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
@ 2014-12-11 17:43 ktkachov at gcc dot gnu.org
2014-12-11 18:05 ` [Bug middle-end/64274] " mpolacek at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-12-11 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
Bug ID: 64274
Summary: [5.0 Regression][ARM]
gcc.target/arm/fixed-point-exec.c ICE in
fold_binary_loc
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
CC: mpolacek at gcc dot gnu.org
Target: arm-none-eabi
As of:
Author: mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Dec 11 11:07:58 2014 +0000
* fold-const.c (fold_negate_expr): Add ANY_INTEGRAL_TYPE_P check.
(extract_muldiv_1): Likewise.
(maybe_canonicalize_comparison_1): Likewise.
(fold_comparison): Likewise.
(tree_binary_nonnegative_warnv_p): Likewise.
(tree_binary_nonzero_warnv_p): Likewise.
* gimple-ssa-strength-reduction.c (legal_cast_p_1): Likewise.
* tree-scalar-evolution.c (simple_iv): Likewise.
(scev_const_prop): Likewise.
* tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
* tree-vect-generic.c (expand_vector_operation): Likewise.
* tree.h (ANY_INTEGRAL_TYPE_CHECK): Define.
(ANY_INTEGRAL_TYPE_P): Define.
(TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED, TYPE_OVERFLOW_TRAPS):
Add ANY_INTEGRAL_TYPE_CHECK.
(any_integral_type_check): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218621
138bc75d-0d04-0410-961f-82ee72b054a4
I'm getting an ICE in the arm testsuite:
spawn $TOP/build/obj/gcc2/gcc/xgcc -B$TOP/build/obj/gcc2/gcc/
$TOP/gcc/gcc/testsuite/gcc.target/arm/fixed-point-exec.c gcc_tg.o
-fno-diagnostics-show-caret -fdiagnostics-color=never -std=gnu99
-specs=aprofile-validation.specs -Wa,-mno-warn-deprecated -Wl,-wrap,exit
-Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o ./fixed-point-exec.exe
$TOP/gcc/gcc/testsuite/gcc.target/arm/fixed-point-exec.c: In function
'plus_fract_short':
$TOP/gcc/gcc/testsuite/gcc.target/arm/fixed-point-exec.c:33:1: internal
compiler error: tree check: expected boolean_type or enumeral_type or
integer_type, have fixed_point_type in fold_binary_loc, at fold-const.c:10085
0xcd6dc3 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
$TOP/gcc/gcc/tree.c:9226
0x6b7775 any_integral_type_check(tree_node*, char const*, int, char const*)
$TOP/gcc/gcc/tree.h:3015
0x7a581f fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
$TOP/gcc/gcc/fold-const.c:10085
0x7c5ebe fold(tree_node*)
$TOP/gcc/gcc/fold-const.c:13892
0x5c5216 c_fully_fold_internal
$TOP/gcc/gcc/c-family/c-common.c:1343
0x5c6fa2 c_fully_fold(tree_node*, bool, bool*)
$TOP/gcc/gcc/c-family/c-common.c:1135
0x5612d8 c_finish_return(unsigned int, tree_node*, tree_node*)
$TOP/gcc/gcc/c/c-typeck.c:9243
0x586fbe c_parser_statement_after_labels
$TOP/gcc/gcc/c/c-parser.c:4999
0x588546 c_parser_compound_statement_nostart
$TOP/gcc/gcc/c/c-parser.c:4676
0x59827d c_parser_compound_statement
$TOP/gcc/gcc/c/c-parser.c:4513
0x599505 c_parser_declaration_or_fndef
$TOP/gcc/gcc/c/c-parser.c:1966
0x5a194e c_parser_external_declaration
$TOP/gcc/gcc/c/c-parser.c:1436
0x5a1bdd c_parser_translation_unit
$TOP/gcc/gcc/c/c-parser.c:1323
0x5a1bdd c_parse_file()
$TOP/gcc/gcc/c/c-parser.c:14408
0x604a21 c_common_parse_file()
$TOP/gcc/gcc/c-family/c-opts.c:1039
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
arm-none-eabi configured with c,c++,fortran --with-float=hard
--with-fpu=neon-vfpv4 --with-cpu=cortex-a15
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
@ 2014-12-11 18:05 ` mpolacek at gcc dot gnu.org
2014-12-12 9:37 ` ktkachov at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-11 18:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-11
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Target Milestone|--- |5.0
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Does the following fix it?
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7b68bea..34f5a6b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -10082,7 +10082,8 @@ fold_binary_loc (location_t loc,
/* Reassociate (plus (plus (mult) (foo)) (mult)) as
(plus (plus (mult) (mult)) (foo)) so that we can
take advantage of the factoring cases below. */
- if (TYPE_OVERFLOW_WRAPS (type)
+ if (ANY_INTEGRAL_TYPE_P (type)
+ && TYPE_OVERFLOW_WRAPS (type)
&& (((TREE_CODE (arg0) == PLUS_EXPR
|| TREE_CODE (arg0) == MINUS_EXPR)
&& TREE_CODE (arg1) == MULT_EXPR)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
2014-12-11 18:05 ` [Bug middle-end/64274] " mpolacek at gcc dot gnu.org
@ 2014-12-12 9:37 ` ktkachov at gcc dot gnu.org
2014-12-12 9:38 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-12-12 9:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
--- Comment #2 from ktkachov at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #1)
> Does the following fix it?
>
> diff --git a/gcc/fold-const.c b/gcc/fold-const.c
> index 7b68bea..34f5a6b 100644
> --- a/gcc/fold-const.c
> +++ b/gcc/fold-const.c
> @@ -10082,7 +10082,8 @@ fold_binary_loc (location_t loc,
> /* Reassociate (plus (plus (mult) (foo)) (mult)) as
> (plus (plus (mult) (mult)) (foo)) so that we can
> take advantage of the factoring cases below. */
> - if (TYPE_OVERFLOW_WRAPS (type)
> + if (ANY_INTEGRAL_TYPE_P (type)
> + && TYPE_OVERFLOW_WRAPS (type)
> && (((TREE_CODE (arg0) == PLUS_EXPR
> || TREE_CODE (arg0) == MINUS_EXPR)
> && TREE_CODE (arg1) == MULT_EXPR)
Yes, thanks. I'll bootstrap this on arm-none-linux-gnueabihf it you'd like
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
2014-12-11 18:05 ` [Bug middle-end/64274] " mpolacek at gcc dot gnu.org
2014-12-12 9:37 ` ktkachov at gcc dot gnu.org
@ 2014-12-12 9:38 ` rguenth at gcc dot gnu.org
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-12 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
That would even fix a wrong-code bug for unsigned fixed-point types.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
` (2 preceding siblings ...)
2014-12-12 9:38 ` rguenth at gcc dot gnu.org
@ 2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-12 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Dec 12 14:02:37 2014
New Revision: 218671
URL: https://gcc.gnu.org/viewcvs?rev=218671&root=gcc&view=rev
Log:
PR middle-end/64274
* fold-const.c (fold_binary_loc): Add ANY_INTEGRAL_TYPE_P check.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
` (3 preceding siblings ...)
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
@ 2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-12 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-12 14:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11 17:43 [Bug middle-end/64274] New: [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc ktkachov at gcc dot gnu.org
2014-12-11 18:05 ` [Bug middle-end/64274] " mpolacek at gcc dot gnu.org
2014-12-12 9:37 ` ktkachov at gcc dot gnu.org
2014-12-12 9:38 ` rguenth at gcc dot gnu.org
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
2014-12-12 14:03 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).