public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros
@ 2008-07-23 1:35 pinskia at gcc dot gnu dot org
2008-07-23 1:41 ` [Bug target/36904] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-23 1:35 UTC (permalink / raw)
To: gcc-bugs
Take the following testcase:
#include <altivec.h>
#define xprint_vec(type) void x##type(vector type v) { }
xprint_vec(float);
This used to work in 4.3 and before but does not currently. The problem here
was introduced when the context sensitive keyword support was added.
--
Summary: [4.4 Regression] vector context sensitive keyword vs
macros
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
@ 2008-07-23 1:41 ` pinskia at gcc dot gnu dot org
2008-08-01 12:46 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-23 1:41 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
2008-07-23 1:41 ` [Bug target/36904] " pinskia at gcc dot gnu dot org
@ 2008-08-01 12:46 ` jakub at gcc dot gnu dot org
2008-08-08 22:49 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-01 12:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-08-01 12:45 -------
Created an attachment (id=15990)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15990&action=view)
gcc44-pr36904.patch
Partial fix, which fixes the testcase from this PR, but still other cases
in the made up testcase fail and I don't know if they are meant to work or not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
2008-07-23 1:41 ` [Bug target/36904] " pinskia at gcc dot gnu dot org
2008-08-01 12:46 ` jakub at gcc dot gnu dot org
@ 2008-08-08 22:49 ` mmitchel at gcc dot gnu dot org
2008-08-26 12:30 ` bje at au1 dot ibm dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-08-08 22:49 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=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-08-08 22:49 ` mmitchel at gcc dot gnu dot org
@ 2008-08-26 12:30 ` bje at au1 dot ibm dot com
2008-09-01 15:40 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bje at au1 dot ibm dot com @ 2008-08-26 12:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from bje at au1 dot ibm dot com 2008-08-26 12:29 -------
Subject: Re: [4.4 Regression] vector context sensitive
keyword vs macros
> Partial fix, which fixes the testcase from this PR, but still other cases
> in the made up testcase fail and I don't know if they are meant to
> work or not.
If it does not make things worse, should we apply this patch?
Ben
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-08-26 12:30 ` bje at au1 dot ibm dot com
@ 2008-09-01 15:40 ` jakub at gcc dot gnu dot org
2008-09-10 21:09 ` jakub at gcc dot gnu dot org
2008-09-10 21:11 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-01 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2008-09-01 15:38 -------
Created an attachment (id=16179)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16179&action=view)
gcc44-pr36904.patch
Updated patch, apparently all other problems can be fixed just by never
expanding the conditional keywords to self. This will make preprocessing them
tiny bit slower (as the macro_to_expand hook might be called several times on
it), but means we handle right even the cases where cpp_get_token is called
with
a conditional macro token in some inner context where following tokens aren't
seen yet (e.g. macro args, etc.).
I don't have any altivec.h codebase around, could one of you test this on
something larger? Thanks.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15990|0 |1
is obsolete| |
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-09-01 15:40 ` jakub at gcc dot gnu dot org
@ 2008-09-10 21:09 ` jakub at gcc dot gnu dot org
2008-09-10 21:11 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-10 21:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2008-09-10 21:07 -------
Subject: Bug 36904
Author: jakub
Date: Wed Sep 10 21:06:25 2008
New Revision: 140247
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140247
Log:
PR target/36904
* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Return NULL
instead of tok->val.node if not expanding to something else. Handle
intervening CPP_PADDING tokens.
(altivec_categorize_keyword): Remove unneeded comparisons.
* gcc.target/powerpc/altivec-27.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/powerpc/altivec-27.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000-c.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/36904] [4.4 Regression] vector context sensitive keyword vs macros
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-10 21:09 ` jakub at gcc dot gnu dot org
@ 2008-09-10 21:11 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-10 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2008-09-10 21:10 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36904
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-10 21:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-23 1:35 [Bug target/36904] New: [4.4 Regression] vector context sensitive keyword vs macros pinskia at gcc dot gnu dot org
2008-07-23 1:41 ` [Bug target/36904] " pinskia at gcc dot gnu dot org
2008-08-01 12:46 ` jakub at gcc dot gnu dot org
2008-08-08 22:49 ` mmitchel at gcc dot gnu dot org
2008-08-26 12:30 ` bje at au1 dot ibm dot com
2008-09-01 15:40 ` jakub at gcc dot gnu dot org
2008-09-10 21:09 ` jakub at gcc dot gnu dot org
2008-09-10 21:11 ` jakub 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).