public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98882] New: ICE in in cpp_directive_only_process on empty translation unit
@ 2021-01-29 10:58 boris at kolpackov dot net
  2021-01-29 11:34 ` [Bug c++/98882] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: boris at kolpackov dot net @ 2021-01-29 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98882
           Summary: ICE in in cpp_directive_only_process on empty
                    translation unit
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: boris at kolpackov dot net
  Target Milestone: ---

I get an internal compiler error when preprocessing with -fdirectives-only an
empty translation unit:

touch test.cxx
g++ -std=c++2a -E -fdirectives-only -o test.ii test.cxx

test.cxx:1: internal compiler error: in cpp_directive_only_process, at
libcpp/lex.c:4323
0x2c09263 cpp_directive_only_process(cpp_reader*, void*, void (*)(cpp_reader*,
CPP_DO_task, void*, ...))
        ../../gcc/libcpp/lex.c:4323
0xf11c8e scan_translation_unit_directives_only
        ../../gcc/gcc/c-family/c-ppoutput.c:402
0xf11158 preprocess_file(cpp_reader*)
        ../../gcc/gcc/c-family/c-ppoutput.c:100
0xf0b6e4 c_common_init()
        ../../gcc/gcc/c-family/c-opts.c:1188
0xbe4d7b cxx_init()
        ../../gcc/gcc/cp/lex.c:332
0x1805e47 lang_dependent_init
        ../../gcc/gcc/toplev.c:1881
0x18066f9 do_compile
        ../../gcc/gcc/toplev.c:2178

This is new in GCC 11.

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

end of thread, other threads:[~2021-02-10  5:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-29 10:58 [Bug c++/98882] New: ICE in in cpp_directive_only_process on empty translation unit boris at kolpackov dot net
2021-01-29 11:34 ` [Bug c++/98882] " jakub at gcc dot gnu.org
2021-01-29 12:01 ` [Bug c++/98882] [11 Regression] " jakub at gcc dot gnu.org
2021-01-29 12:32 ` [Bug preprocessor/98882] " jakub at gcc dot gnu.org
2021-02-03 22:18 ` cvs-commit at gcc dot gnu.org
2021-02-03 22:19 ` jakub at gcc dot gnu.org
2021-02-08 10:42 ` boris at kolpackov dot net
2021-02-09 16:40 ` jakub at gcc dot gnu.org
2021-02-10  5:21 ` boris at kolpackov dot net

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