* [Bug target/61977] powerpc-eabi preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
@ 2015-03-20 19:18 ` drivshin at allworx dot com
2015-03-31 17:11 ` [Bug target/61977] powerpc " msebor at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: drivshin at allworx dot com @ 2015-03-20 19:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
David Rivshin <drivshin at allworx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |powerpc-eabi
Known to work| |4.9.0
Known to fail| |4.9.1, 4.9.2
--- Comment #1 from David Rivshin <drivshin at allworx dot com> ---
This is still happening in the latest trunk and latest 4.9 branch code.
Simplified steps to reproduce:
../gcc.svn/configure --prefix=${PWD}/../local --enable-languages=c
--with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --target=powerpc-eabi
--disable-shared --with-newlib
make all-gcc
make install-gcc
echo -e "# comment ending in vector" | ../local/bin/powerpc-eabi-cpp -x
assembler-with-cpp
I'm fairly certain this is the same root cause as bug 51654, and changeset
r210055 just exposed some non-altivec powerpc targets to it. In addition to the
workarounds mentioned there (bug 51654, comment 3), removing the call to
init_vector_keywords() in rs6000_cpu_cpp_builtins() also works.
Since those vector keywords only have effect if TARGET_ALTIVEC (see
rs6000_macro_to_expand()), making their definition conditional upon
TARGET_ALTIVEC resolves the 4.9.1 regression (as best I can tell). Although
that obviously does not resolve the underlying issue, which has existed since
at least 4.6 (according to bug 51654).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/61977] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
2015-03-20 19:18 ` [Bug target/61977] " drivshin at allworx dot com
@ 2015-03-31 17:11 ` msebor at gcc dot gnu.org
2015-03-31 17:29 ` trippels at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: msebor at gcc dot gnu.org @ 2015-03-31 17:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
See also pr65638 for a similar problem.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/61977] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
2015-03-20 19:18 ` [Bug target/61977] " drivshin at allworx dot com
2015-03-31 17:11 ` [Bug target/61977] powerpc " msebor at gcc dot gnu.org
@ 2015-03-31 17:29 ` trippels at gcc dot gnu.org
2015-03-31 17:51 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-03-31 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |JamesMikeDuPont@googlemail.
| |com
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
*** Bug 65638 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/61977] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (2 preceding siblings ...)
2015-03-31 17:29 ` trippels at gcc dot gnu.org
@ 2015-03-31 17:51 ` jakub at gcc dot gnu.org
2015-03-31 18:07 ` [Bug preprocessor/61977] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-31 17:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The problem is that cpp_peek_token, if it returns CPP_EOF, is fatal in the
preprocessing:
do
{
peektok = _cpp_lex_token (pfile);
if (peektok->type == CPP_EOF)
return peektok;
}
while (index--);
but the macro_to_expand stuff (for which cpp_peek_token has been written, BTW)
really assumes that it can non-destructively peek tokens when needed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (3 preceding siblings ...)
2015-03-31 17:51 ` jakub at gcc dot gnu.org
@ 2015-03-31 18:07 ` jakub at gcc dot gnu.org
2015-03-31 18:26 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-31 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |preprocessor
Target Milestone|--- |4.8.5
Summary|powerpc preprocessor breaks |[4.8/4.9/5 Regression]
|on lines that end with |powerpc preprocessor breaks
|"vector" |on lines that end with
| |"vector"
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Obviously regression from the times when vector wasn't a conditional macro.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (4 preceding siblings ...)
2015-03-31 18:07 ` [Bug preprocessor/61977] [4.8/4.9/5 Regression] " jakub at gcc dot gnu.org
@ 2015-03-31 18:26 ` jakub at gcc dot gnu.org
2015-04-01 14:57 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-31 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-03-31
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 35194
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35194&action=edit
gcc5-pr61977.patch
Untested fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (5 preceding siblings ...)
2015-03-31 18:26 ` jakub at gcc dot gnu.org
@ 2015-04-01 14:57 ` jakub at gcc dot gnu.org
2015-04-02 11:55 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-01 14:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Please see:
http://gcc.gnu.org/ml/gcc-patches/2015-04/msg00004.html
http://gcc.gnu.org/ml/gcc-patches/2015-04/msg00005.html
http://gcc.gnu.org/ml/gcc-patches/2015-04/msg00013.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (6 preceding siblings ...)
2015-04-01 14:57 ` jakub at gcc dot gnu.org
@ 2015-04-02 11:55 ` jakub at gcc dot gnu.org
2015-04-02 12:08 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-02 11:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Apr 2 11:54:58 2015
New Revision: 221838
URL: https://gcc.gnu.org/viewcvs?rev=221838&root=gcc&view=rev
Log:
PR preprocessor/61977
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Don't
predefine __vector/__bool/__pixel macros nor context sensitive
macros for CLK_ASM.
* config/spu/spu-c.c (spu_cpu_cpp_builtins): Similarly.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000-c.c
trunk/gcc/config/spu/spu-c.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (7 preceding siblings ...)
2015-04-02 11:55 ` jakub at gcc dot gnu.org
@ 2015-04-02 12:08 ` jakub at gcc dot gnu.org
2015-04-06 17:02 ` jakub at gcc dot gnu.org
2015-04-06 17:04 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-02 12:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Two out of the 3 patches applied to trunk, still waiting for review of the
first patch.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (8 preceding siblings ...)
2015-04-02 12:08 ` jakub at gcc dot gnu.org
@ 2015-04-06 17:02 ` jakub at gcc dot gnu.org
2015-04-06 17:04 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-06 17:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Apr 6 17:01:50 2015
New Revision: 221882
URL: https://gcc.gnu.org/viewcvs?rev=221882&root=gcc&view=rev
Log:
PR preprocessor/61977
* lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
with all tokens peeked by the current function.
* gcc.dg/cpp/pr61977.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/cpp/pr61977.c
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libcpp/ChangeLog
trunk/libcpp/lex.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/61977] [4.8/4.9/5 Regression] powerpc preprocessor breaks on lines that end with "vector"
2014-07-31 15:32 [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector" drivshin at allworx dot com
` (9 preceding siblings ...)
2015-04-06 17:02 ` jakub at gcc dot gnu.org
@ 2015-04-06 17:04 ` jakub at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-06 17:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread