public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30427] New: ~ vector float is accepted
@ 2007-01-10 20:50 pinskia at gcc dot gnu dot org
2007-07-09 8:31 ` [Bug c/30427] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 20:50 UTC (permalink / raw)
To: gcc-bugs
Testcase:
#define vector __attribute__((vector_size(16) ))
vector float a;
int f(void)
{
a = ~a;
}
-----------
This is rejected with the C++ front-end:
t.c: In function 'int f()':
t.c:7: error: wrong type argument to bit-complement
--
Summary: ~ vector float is accepted
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
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=30427
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/30427] ~ vector float is accepted
2007-01-10 20:50 [Bug c/30427] New: ~ vector float is accepted pinskia at gcc dot gnu dot org
@ 2007-07-09 8:31 ` pinskia at gcc dot gnu dot org
2007-08-12 19:52 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-07-09 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-09 08:31 -------
Patch (which needs testing):
Index: c-typeck.c
===================================================================
--- c-typeck.c (revision 126424)
+++ c-typeck.c (working copy)
@@ -2825,7 +2825,9 @@
break;
case BIT_NOT_EXPR:
- if (typecode == INTEGER_TYPE || typecode == VECTOR_TYPE)
+ if (typecode == INTEGER_TYPE
+ || (typecode == VECTOR_TYPE
+ && !VECTOR_FLOAT_TYPE_P (TREE_TYPE (arg))))
{
if (!noconvert)
arg = default_conversion (arg);
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-09 08:31:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30427
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/30427] ~ vector float is accepted
2007-01-10 20:50 [Bug c/30427] New: ~ vector float is accepted pinskia at gcc dot gnu dot org
2007-07-09 8:31 ` [Bug c/30427] " pinskia at gcc dot gnu dot org
@ 2007-08-12 19:52 ` pinskia at gcc dot gnu dot org
2007-08-13 20:06 ` pinskia at gcc dot gnu dot org
2007-08-13 20:08 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-12 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-12 19:51 -------
I am testing this patch right now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30427
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/30427] ~ vector float is accepted
2007-01-10 20:50 [Bug c/30427] New: ~ vector float is accepted pinskia at gcc dot gnu dot org
2007-07-09 8:31 ` [Bug c/30427] " pinskia at gcc dot gnu dot org
2007-08-12 19:52 ` pinskia at gcc dot gnu dot org
@ 2007-08-13 20:06 ` pinskia at gcc dot gnu dot org
2007-08-13 20:08 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-13 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-08-13 20:06 -------
Subject: Bug 30427
Author: pinskia
Date: Mon Aug 13 20:06:15 2007
New Revision: 127396
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127396
Log:
2007-08-13 Andrew Pinski <pinskia@gmail.com>
PR C/30427
* c-typeck.c (build_unary_op <case BIT_NOT_EXPR>): Reject vector float
types.
2007-08-13 Andrew Pinski <pinskia@gmail.com>
PR C/30427
* gcc.dg/vector-1.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/vector-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30427
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/30427] ~ vector float is accepted
2007-01-10 20:50 [Bug c/30427] New: ~ vector float is accepted pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-08-13 20:06 ` pinskia at gcc dot gnu dot org
@ 2007-08-13 20:08 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-13 20:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-08-13 20:07 -------
Fixed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30427
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-13 20:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-10 20:50 [Bug c/30427] New: ~ vector float is accepted pinskia at gcc dot gnu dot org
2007-07-09 8:31 ` [Bug c/30427] " pinskia at gcc dot gnu dot org
2007-08-12 19:52 ` pinskia at gcc dot gnu dot org
2007-08-13 20:06 ` pinskia at gcc dot gnu dot org
2007-08-13 20:08 ` pinskia 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).