public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/61977] New: powerpc-eabi preprocessor breaks on lines that end with "vector"
@ 2014-07-31 15:32 drivshin at allworx dot com
  2015-03-20 19:18 ` [Bug target/61977] " drivshin at allworx dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: drivshin at allworx dot com @ 2014-07-31 15:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61977

            Bug ID: 61977
           Summary: powerpc-eabi preprocessor breaks on lines that end
                    with "vector"
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: drivshin at allworx dot com

Created attachment 33219
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33219&action=edit
patch to revert 210055 and 211656

The powerpc-eabi (and powerpc-eabispe -mno-spe; I haven't tried other
powerpc-*) preprocessor misbehaves when a line ends with "vector". I happened
to hit this in assembler comments, but that does not appear to be a
requirement.

Examples of lines which cause the failure:
vector
# vector
# x vector
x # vector
; vector
# .vector
# +vector

Examples of lines which do not cause the failure:
# vectors
# vector x
# vector.
# _vector
// vector   (unless -C is given)
vector;

The symptom depends on whether that is the last non-whitespace line in the
file. If it is, then the result is an ICE. If it is not, then just "vector"
appears by itself on the next line.

This did not happen on GCC 4.9.0, but does happen in GCC 4.9.1 and the current
trunk. Bisecting between 4.9.0 and 4.9.1 points to SVN revision 210055 as
introducing this behavior. Reverting r210055 (and also r211656 which seemed to
be dependant upon r210055) appears to fix the issue, and a patch (against
4.9.1) doing that is attached.

----

$ prefix/bin/powerpc-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=prefix/bin/powerpc-eabi-gcc
COLLECT_LTO_WRAPPER=/home/drivshin/gcc-powerpc-eabi/prefix/bin/../libexec/gcc/powerpc-eabi/4.9.1/lto-wrapper
Target: powerpc-eabi
Configured with: ../gcc-4.9.1/configure -v
--prefix=/home/drivshin/gcc-powerpc-eabi/build-gcc/../prefix
--target=powerpc-eabi --enable-languages=c
Thread model: single
gcc version 4.9.1 (GCC) 

---- 

$ echo -e "# comment ending in vector\n# another comment" |
prefix/bin/powerpc-eabi-cpp -x assembler-with-cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
# comment ending in
 vector
# 2 "<stdin>"
# another comment

----

$ echo -e "# comment ending in vector" | prefix/bin/powerpc-eabi-cpp -x
assembler-with-cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
<stdin>:1:0: internal compiler error: Segmentation fault
0x82f7bf crash_signal
        ../../gcc-4.9.1/gcc/toplev.c:337
0xc37b75 _cpp_lex_direct
        ../../gcc-4.9.1/libcpp/lex.c:2171
0xc389fb _cpp_lex_token
        ../../gcc-4.9.1/libcpp/lex.c:2055
0xc3d117 cpp_get_token_1
        ../../gcc-4.9.1/libcpp/macro.c:2359
0x559877 scan_translation_unit
        ../../gcc-4.9.1/gcc/c-family/c-ppoutput.c:176
0x559877 preprocess_file(cpp_reader*)
        ../../gcc-4.9.1/gcc/c-family/c-ppoutput.c:101
0x558360 c_common_init()
        ../../gcc-4.9.1/gcc/c-family/c-opts.c:1047
0x4ff08d c_objc_common_init()
        ../../gcc-4.9.1/gcc/c/c-objc-common.c:65
0x8312c6 lang_dependent_init
        ../../gcc-4.9.1/gcc/toplev.c:1712
0x8312c6 do_compile
        ../../gcc-4.9.1/gcc/toplev.c:1900


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-06 17:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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

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).