public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/29091] New: vector constant not fully outputed
@ 2006-09-14 22:58 pinskia at gcc dot gnu dot org
2006-09-14 23:07 ` [Bug c/29091] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14 22:58 UTC (permalink / raw)
To: gcc-bugs
Testcase:
#include <stdlib.h>
__attribute__((vector_size(16))) int a = {1, 2};
int main(void)
{
int *b = (int*)&a;
if (b[0] != 1)
abort ();
if (b[1] != 2)
abort ();
if (b[2] != 0)
abort ();
if (b[3] != 0)
abort ();
return 0;
}
----
The VECTOR_CST has only two elements.
--
Summary: vector constant not fully outputed
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
@ 2006-09-14 23:07 ` pinskia at gcc dot gnu dot org
2006-09-15 5:34 ` [Bug c/29091] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-14 23:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-14 23:07 -------
The C++ front-end produces:
a:
.long 1
.long 2
.zero 8
While the C front-end does not have .zero there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
2006-09-14 23:07 ` [Bug c/29091] " pinskia at gcc dot gnu dot org
@ 2006-09-15 5:34 ` pinskia at gcc dot gnu dot org
2006-09-15 5:35 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-15 5:34 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |3.3.3 3.4.0 4.0.0 4.1.0
| |4.2.0
Known to work| |3.2.3
Summary|vector constant not fully |[4.0/4.1/4.2 Regression]
|outputed |vector constant not fully
| |outputed
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
2006-09-14 23:07 ` [Bug c/29091] " pinskia at gcc dot gnu dot org
2006-09-15 5:34 ` [Bug c/29091] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-09-15 5:35 ` pinskia at gcc dot gnu dot org
2006-09-16 10:16 ` steven at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-15 5:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-15 05:35 -------
3.2.3 on x86 with -msse (since we did not have generic vectors until 3.3)
works.
And 3.3.3 fails (even with -msse).
Note a better testcase is something like:
#include <stdlib.h>
__attribute__((vector_size(16))) int a = {1, 2};
int c = 1;
__attribute__((vector_size(16))) int b = {1, 2};
int main(void)
{
int *b = (int*)&a;
if (b[0] != 1)
abort ();
if (b[1] != 2)
abort ();
if (b[2] != 0)
abort ();
if (b[3] != 0)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-09-15 5:35 ` pinskia at gcc dot gnu dot org
@ 2006-09-16 10:16 ` steven at gcc dot gnu dot org
2006-09-17 1:23 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-09-16 10:16 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-09-16 10:16:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-09-16 10:16 ` steven at gcc dot gnu dot org
@ 2006-09-17 1:23 ` pinskia at gcc dot gnu dot org
2006-09-20 22:36 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-17 1:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-09-17 01:23 -------
This was caused by:
2003-04-01 Aldy Hernandez <aldyh@redhat.com>
* testsuite/gcc.c-torture/execute/simd-3.c: New.
* expr.c (expand_expr): Handle VECTOR_CST.
(const_vector_from_tree): New.
* varasm.c (output_constant): Handle VECTOR_CST.
* c-typeck.c (digest_init): Build a vector constant from a
VECTOR_TYPE.
Specificly the digest_init change, though output_constant does not check make
sure we have the right number of elements either. build_vector does not
either.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-09-17 1:23 ` pinskia at gcc dot gnu dot org
@ 2006-09-20 22:36 ` mmitchel at gcc dot gnu dot org
2006-10-04 16:28 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-20 22:36 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-09-20 22:36 ` mmitchel at gcc dot gnu dot org
@ 2006-10-04 16:28 ` jakub at gcc dot gnu dot org
2006-10-06 7:16 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-10-04 16:28 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |10/msg00193.html
Status|NEW |ASSIGNED
Keywords| |patch
Last reconfirmed|2006-09-16 10:16:06 |2006-10-04 16:28:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1/4.2 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-10-04 16:28 ` jakub at gcc dot gnu dot org
@ 2006-10-06 7:16 ` jakub at gcc dot gnu dot org
2006-10-06 7:43 ` [Bug c/29091] [4.0/4.1 " jakub at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-10-06 7:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2006-10-06 07:16 -------
Subject: Bug 29091
Author: jakub
Date: Fri Oct 6 07:15:48 2006
New Revision: 117481
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117481
Log:
PR c/29091
* varasm.c (output_constant): If TREE_VECTOR_CST_ELTS chain is shorter
than
the number of vector elements fill the rest with zeros.
* gcc.dg/pr29091.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr29091.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-10-06 7:16 ` jakub at gcc dot gnu dot org
@ 2006-10-06 7:43 ` jakub at gcc dot gnu dot org
2006-10-16 9:59 ` jakub at gcc dot gnu dot org
2007-02-03 20:16 ` [Bug c/29091] [4.0 " gdr at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-10-06 7:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2006-10-06 07:42 -------
Fixed on the trunk so far.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1/4.2 Regression] |[4.0/4.1 Regression] vector
|vector constant not fully |constant not fully outputed
|outputed |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0/4.1 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-10-06 7:43 ` [Bug c/29091] [4.0/4.1 " jakub at gcc dot gnu dot org
@ 2006-10-16 9:59 ` jakub at gcc dot gnu dot org
2007-02-03 20:16 ` [Bug c/29091] [4.0 " gdr at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-10-16 9:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2006-10-16 09:58 -------
Subject: Bug 29091
Author: jakub
Date: Mon Oct 16 09:58:48 2006
New Revision: 117779
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117779
Log:
PR c/29091
* varasm.c (output_constant): If TREE_VECTOR_CST_ELTS chain is shorter
than
the number of vector elements fill the rest with zeros.
* gcc.dg/pr29091.c: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr29091.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/varasm.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/29091] [4.0 Regression] vector constant not fully outputed
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2006-10-16 9:59 ` jakub at gcc dot gnu dot org
@ 2007-02-03 20:16 ` gdr at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from gdr at gcc dot gnu dot org 2007-02-03 20:16 -------
Fixed in GCC-4.1.2.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29091
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-02-03 20:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-14 22:58 [Bug c/29091] New: vector constant not fully outputed pinskia at gcc dot gnu dot org
2006-09-14 23:07 ` [Bug c/29091] " pinskia at gcc dot gnu dot org
2006-09-15 5:34 ` [Bug c/29091] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-09-15 5:35 ` pinskia at gcc dot gnu dot org
2006-09-16 10:16 ` steven at gcc dot gnu dot org
2006-09-17 1:23 ` pinskia at gcc dot gnu dot org
2006-09-20 22:36 ` mmitchel at gcc dot gnu dot org
2006-10-04 16:28 ` jakub at gcc dot gnu dot org
2006-10-06 7:16 ` jakub at gcc dot gnu dot org
2006-10-06 7:43 ` [Bug c/29091] [4.0/4.1 " jakub at gcc dot gnu dot org
2006-10-16 9:59 ` jakub at gcc dot gnu dot org
2007-02-03 20:16 ` [Bug c/29091] [4.0 " gdr at gcc dot gnu dot 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).