public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dsabogal.ufl at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/67046] New: Segmentation fault when a preprocessor directive follows the argument to _Pragma
Date: Tue, 28 Jul 2015 21:34:00 -0000	[thread overview]
Message-ID: <bug-67046-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 67046
           Summary: Segmentation fault when a preprocessor directive
                    follows the argument to _Pragma
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dsabogal.ufl at gmail dot com
  Target Milestone: ---

This issue arises from the following (intricate) code. It works when the string
literal doesn't new begin on a newline.


Failing
=======
_Pragma(
"message(\"msg\")"
#
)
int main(void) { return 0; }


Working
=======
_Pragma("message(\"msg\")"
#
)
int main(void) { return 0; }


Output
======
$ gcc -E test.c
# 1 "test.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "test.c"



gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.


Version
=======
This issue occurs on the few compilers that I've tried (4.9.2 and 5.2.0).

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-5.2.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --disable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.2.0 (GCC)


             reply	other threads:[~2015-07-28 21:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 21:34 dsabogal.ufl at gmail dot com [this message]
2021-12-06  5:30 ` [Bug preprocessor/67046] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-17 15:18 ` rguenth at gcc dot gnu.org
2022-05-27  9:35 ` [Bug preprocessor/67046] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:31 ` jakub at gcc dot gnu.org
2023-01-13 22:36 ` lhyatt at gcc dot gnu.org
2023-01-17 18:01 ` lhyatt at gcc dot gnu.org
2023-03-13 13:08 ` cvs-commit at gcc dot gnu.org
2023-03-13 13:09 ` lhyatt 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-67046-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).