public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gabravier at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/97471] New: ICE on using function-like macro as a non function-like macro
Date: Sat, 17 Oct 2020 16:21:21 +0000	[thread overview]
Message-ID: <bug-97471-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 97471
           Summary: ICE on using function-like macro as a non
                    function-like macro
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gabravier at gmail dot com
  Target Milestone: ---

#define a() b
a

This crashes GCC's preprocessor on current trunk (as of the 16th), with this
message :

<source>:2:1: internal compiler error: Segmentation fault
    2 | a
      | ^
0x19720a9 internal_error(char const*, ...)
        ???:0
0x19b406f _cpp_lex_direct
        ???:0
0x19b5ab5 _cpp_lex_token
        ???:0
0x77c4c0 c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
        ???:0
0x6eb1ae c_parser_peek_2nd_token(c_parser*)
        ???:0
0x721b39 c_parse_file()
        ???:0
0x78bdf2 c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1


GCC -v output :

Using built-in specs.
COLLECT_GCC=/opt/compiler-explorer/gcc-snapshot/bin/gcc
Target: x86_64-linux-gnu
Configured with: ../gcc-trunk-20201017/configure
--prefix=/opt/compiler-explorer/gcc-build/staging --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap
--enable-multiarch --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --enable-clocale=gnu --enable-languages=c,c++,fortran,ada,d
--enable-ld=yes --enable-gold=yes --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-linker-build-id --enable-lto
--enable-plugins --enable-threads=posix
--with-pkgversion=Compiler-Explorer-Build
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20201016 (experimental) (Compiler-Explorer-Build) 
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-g' '-o' './output.s'
'-masm=intel' '-S' '-v' '-mtune=generic' '-march=x86-64' '-dumpdir' './'

/opt/compiler-explorer/gcc-trunk-20201017/bin/../libexec/gcc/x86_64-linux-gnu/11.0.0/cc1
-quiet -v -imultiarch x86_64-linux-gnu -iprefix
/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/
<source> -quiet -dumpdir ./ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mtune=generic -march=x86-64 -g -version -fdiagnostics-color=always -o
./output.s
GNU C17 (Compiler-Explorer-Build) version 11.0.0 20201016 (experimental)
(x86_64-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory
"/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/../../../../x86_64-linux-gnu/include"
ignoring duplicate directory
"/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/11.0.0/include"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring duplicate directory
"/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/11.0.0/include-fixed"
ignoring nonexistent directory
"/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/../../lib/gcc/x86_64-linux-gnu/11.0.0/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/include

/opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/include-fixed
 /usr/local/include
 /opt/compiler-explorer/gcc-trunk-20201017/bin/../lib/gcc/../../include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C17 (Compiler-Explorer-Build) version 11.0.0 20201016 (experimental)
(x86_64-linux-gnu)
        compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 129d0909b5f5d2346755498e10395559

             reply	other threads:[~2020-10-17 16:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-17 16:21 gabravier at gmail dot com [this message]
2020-10-19  7:26 ` [Bug preprocessor/97471] [11 Regression] ICE on using function-like macro as a non function-like macro since r11-338-g2a0225e47868fbfc marxin at gcc dot gnu.org
2020-10-19  7:28 ` rguenth at gcc dot gnu.org
2020-10-19 11:59 ` nathan at gcc dot gnu.org
2020-10-19 15:01 ` nathan at gcc dot gnu.org
2020-10-19 21:35 ` nathan at gcc dot gnu.org
2020-10-20 15:02 ` nathan at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-97471-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).