public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
@ 2012-09-26 8:07 ubizjak at gmail dot com
2012-09-26 8:59 ` [Bug tree-optimization/54713] " rguenth at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2012-09-26 8:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Bug #: 54713
Summary: [4.8 Regression] error: non-trivial conversion at
assignment in gcc.c-torture/compile/pr53410-2.c
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ubizjak@gmail.com
Target: alpha-linux-gnu
Following testcase, derived from gcc.c-torture/compile/pr53410-2.c started to
ICE on alpha-linux-gnu recently.
--cut here--
typedef int V __attribute__((vector_size (4 * sizeof (int))));
void
f6 (V *p, V *q, V *r)
{
*p = (*p & *r) == (*q & *r);
}
--cut here--
ICE can be triggered with a cross from x86_64-pc-linux-gnu:
~/gcc-build-alpha/gcc/cc1 -O2 -quiet tt.c
tt.c: In function ‘f6’:
tt.c:4:1: error: non-trivial conversion at assignment
f6 (V *p, V *q, V *r)
^
int
vector(2) int
_24 = _20;
tt.c:4:1: error: non-trivial conversion at assignment
int
vector(2) int
_26 = _23;
tt.c:4:1: internal compiler error: verify_gimple failed
Please submit a full bug report,
...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
@ 2012-09-26 8:59 ` rguenth at gcc dot gnu.org
2012-09-26 9:20 ` jakub at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-26 8:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-26 08:58:49 UTC ---
ISTR alpha has BLKmode vectors.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
2012-09-26 8:59 ` [Bug tree-optimization/54713] " rguenth at gcc dot gnu.org
@ 2012-09-26 9:20 ` jakub at gcc dot gnu.org
2012-09-26 12:52 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-26 9:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-26 09:19:55 UTC ---
I think this is a bug in fold_ternary_loc. The thing is that forwprop tries to
simplify_bitfield_ref, _24 = BIT_FIELD_REF <_9, 32, 0>, where _9 is TImode
4xint
vector, _24 is int, and _9 = { _20, _23 }; where _20 and _23 are V2SI vectors.
Fold then assumes that a vector CONSTRUCTOR will only contain scalars, not
shorter vectors, and returns the first vector as whole.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
2012-09-26 8:59 ` [Bug tree-optimization/54713] " rguenth at gcc dot gnu.org
2012-09-26 9:20 ` jakub at gcc dot gnu.org
@ 2012-09-26 12:52 ` jakub at gcc dot gnu.org
2012-09-27 16:08 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-26 12:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-09-26
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-26 12:51:45 UTC ---
Created attachment 28280
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28280
gcc48-pr54713.patch
Untested fix (with testcases that ICE even on x86_64).
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (2 preceding siblings ...)
2012-09-26 12:52 ` jakub at gcc dot gnu.org
@ 2012-09-27 16:08 ` jakub at gcc dot gnu.org
2012-09-28 8:36 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-27 16:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #28280|0 |1
is obsolete| |
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-27 16:07:29 UTC ---
Created attachment 28293
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28293
gcc48-pr54713.patch
Updated patch. I had to make the CONSTRUCTOR checking less strict, in
particular there are CONSTRUCTORS with (consecutive) indexes as well as NULL
indexes, there are CONSTRUCTORS with less than nunits elements even when the
elements are scalar.
But even with all this I'm still getting gfortran.dg/loc_2.f90 -O3 ICEs,
apparently SLP creates vector CONSTRUCTOR with type integer(kind=4) vector, but
elements logical(kind=4) (i.e. same TYPE_MODE, but INTEGER_TYPE vs.
BOOLEAN_TYPE. Shall I make the verification even less strict (check TYPE_MODE
instead of useless_type_conversion?), or shall we fix the vectorizer?
Shouldn't I split the patch into the bugfixes + testcases and submit it before
the verification, so that the latter can be done more slowly?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (3 preceding siblings ...)
2012-09-27 16:08 ` jakub at gcc dot gnu.org
@ 2012-09-28 8:36 ` rguenth at gcc dot gnu.org
2012-09-28 12:19 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-28 8:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-28 08:36:28 UTC ---
(In reply to comment #4)
> Created attachment 28293 [details]
> gcc48-pr54713.patch
>
> Updated patch. I had to make the CONSTRUCTOR checking less strict, in
> particular there are CONSTRUCTORS with (consecutive) indexes as well as NULL
> indexes, there are CONSTRUCTORS with less than nunits elements even when the
> elements are scalar.
Ugh, less than nunits is probably ok for GENERIC but in GIMPLE we really
want trailing zeros explicit ... :/ Thus, if we need to "gimplify"
vector constructors we can as well clear their indexes?
> But even with all this I'm still getting gfortran.dg/loc_2.f90 -O3 ICEs,
> apparently SLP creates vector CONSTRUCTOR with type integer(kind=4) vector, but
> elements logical(kind=4) (i.e. same TYPE_MODE, but INTEGER_TYPE vs.
> BOOLEAN_TYPE. Shall I make the verification even less strict (check TYPE_MODE
> instead of useless_type_conversion?), or shall we fix the vectorizer?
The vectorizer needs to be fixed. See the comment in
get_vectype_for_scalar_type_and_size:
/* For vector types of elements whose mode precision doesn't
match their types precision we use a element type of mode
precision. The vectorization routines will have to make sure
they support the proper result truncation/extension.
We also make sure to build vector types with INTEGER_TYPE
component type only. */
> Shouldn't I split the patch into the bugfixes + testcases and submit it before
> the verification, so that the latter can be done more slowly?
Yes, I think separate patches would be prefered.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (4 preceding siblings ...)
2012-09-28 8:36 ` rguenth at gcc dot gnu.org
@ 2012-09-28 12:19 ` jakub at gcc dot gnu.org
2012-10-02 9:18 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-28 12:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-09-28 12:19:07 UTC ---
Author: jakub
Date: Fri Sep 28 12:18:57 2012
New Revision: 191826
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191826
Log:
PR tree-optimization/54713
* fold-const.c (vec_cst_ctor_to_array): Give up if vector CONSTRUCTOR
has vector elements.
(fold_ternary_loc) <case BIT_FIELD_REF>: Likewise.
* tree-vect-generic.c (vector_element): Don't rely on CONSTRUCTOR elts
indexes. Use BIT_FIELD_REF if CONSTRUCTOR has vector elements.
(lower_vec_perm): Use NULL_TREE CONSTRUCTOR indexes.
* gcc.c-torture/compile/pr54713-1.c: New test.
* gcc.c-torture/compile/pr54713-2.c: New test.
* gcc.c-torture/compile/pr54713-3.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
trunk/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
trunk/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-generic.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (5 preceding siblings ...)
2012-09-28 12:19 ` jakub at gcc dot gnu.org
@ 2012-10-02 9:18 ` jakub at gcc dot gnu.org
2012-10-02 13:43 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-02 9:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-02 09:18:38 UTC ---
Created attachment 28322
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28322
gcc48-pr54713.patch
Updated version of the verifier. This one doesn't pass regtest, e.g.
g++.dg/torture/vshuf*.C fail, because non-gimplified CONSTRUCTORs with non-NULL
indexes get into the IL from DECL_INITIAL during fold_stmt.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (6 preceding siblings ...)
2012-10-02 9:18 ` jakub at gcc dot gnu.org
@ 2012-10-02 13:43 ` jakub at gcc dot gnu.org
2012-10-15 23:26 ` danglin at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-02 13:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-02 13:43:13 UTC ---
Author: jakub
Date: Tue Oct 2 13:43:09 2012
New Revision: 191983
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191983
Log:
PR tree-optimization/54713
* expr.c (categorize_ctor_elements_1): Don't assume purpose is
non-NULL.
* tree-cfg.c (verify_gimple_assign_single): Add verification of
vector CONSTRUCTORs.
* tree-ssa-sccvn.c (vn_reference_lookup_3): For VECTOR_TYPE
CONSTRUCTORs, don't do anything if element type is VECTOR_TYPE,
and don't check index.
* tree-vect-slp.c (vect_get_constant_vectors): VIEW_CONVERT_EXPR
ctor elements first if their type isn't compatible with vector
element type.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/tree-cfg.c
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-vect-slp.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (7 preceding siblings ...)
2012-10-02 13:43 ` jakub at gcc dot gnu.org
@ 2012-10-15 23:26 ` danglin at gcc dot gnu.org
2012-11-07 13:30 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-10-15 23:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu.org
--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> 2012-10-15 23:25:52 UTC ---
This test has recently started to fail on 32-bit hppa targets.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (8 preceding siblings ...)
2012-10-15 23:26 ` danglin at gcc dot gnu.org
@ 2012-11-07 13:30 ` jakub at gcc dot gnu.org
2012-11-07 17:18 ` dave.anglin at bell dot net
2012-11-07 17:19 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-07 13:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-07 13:29:52 UTC ---
Which test started failing? I don't see either pr53410 or pr54713 in
http://gcc.gnu.org/ml/gcc-testresults/2012-11/msg00082.html
nor
http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg02866.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (9 preceding siblings ...)
2012-11-07 13:30 ` jakub at gcc dot gnu.org
@ 2012-11-07 17:18 ` dave.anglin at bell dot net
2012-11-07 17:19 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: dave.anglin at bell dot net @ 2012-11-07 17:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
--- Comment #11 from dave.anglin at bell dot net 2012-11-07 17:17:47 UTC ---
On 11/7/2012 8:29 AM, jakub at gcc dot gnu.org wrote:
> Which test started failing?
pr53410 was failing here
http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg02016.html
but the problem seems to have gone away in later runs.
Dave
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/54713] [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
` (10 preceding siblings ...)
2012-11-07 17:18 ` dave.anglin at bell dot net
@ 2012-11-07 17:19 ` jakub at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-07 17:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54713
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |FIXED
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-07 17:19:37 UTC ---
Fixed then.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-11-07 17:19 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 8:07 [Bug tree-optimization/54713] New: [4.8 Regression] error: non-trivial conversion at assignment in gcc.c-torture/compile/pr53410-2.c ubizjak at gmail dot com
2012-09-26 8:59 ` [Bug tree-optimization/54713] " rguenth at gcc dot gnu.org
2012-09-26 9:20 ` jakub at gcc dot gnu.org
2012-09-26 12:52 ` jakub at gcc dot gnu.org
2012-09-27 16:08 ` jakub at gcc dot gnu.org
2012-09-28 8:36 ` rguenth at gcc dot gnu.org
2012-09-28 12:19 ` jakub at gcc dot gnu.org
2012-10-02 9:18 ` jakub at gcc dot gnu.org
2012-10-02 13:43 ` jakub at gcc dot gnu.org
2012-10-15 23:26 ` danglin at gcc dot gnu.org
2012-11-07 13:30 ` jakub at gcc dot gnu.org
2012-11-07 17:18 ` dave.anglin at bell dot net
2012-11-07 17:19 ` jakub 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).