public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tijl at coosemans dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/65345] New: ICE with _Generic selection on _Atomic int
Date: Sat, 07 Mar 2015 20:48:00 -0000	[thread overview]
Message-ID: <bug-65345-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 65345
           Summary: ICE with _Generic selection on _Atomic int
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tijl at coosemans dot org

gcc49 (FreeBSD Ports Collection) 4.9.3 20150218 (prerelease)

% cat test.c
_Atomic int i;  
int j = _Generic( i+1, int: 1, default: 0 );

% gcc49 -c test.c
tmp.c:2:1: internal compiler error: Segmentation fault
 int j = _Generic( i+1, int: 1, default: 0 );
 ^
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


The error only happens when "i" is part of an expression, so _Generic(i,...)
works correctly (it returns 1).  Qualifiers like const and volatile instead of
_Atomic also work.


             reply	other threads:[~2015-03-07 20:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-07 20:48 tijl at coosemans dot org [this message]
2015-03-07 20:59 ` [Bug c/65345] " mpolacek at gcc dot gnu.org
2015-03-07 21:13 ` mpolacek at gcc dot gnu.org
2015-03-07 21:18 ` mpolacek at gcc dot gnu.org
2015-03-09 16:32 ` joseph at codesourcery dot com
2015-03-09 16:50 ` mpolacek at gcc dot gnu.org
2015-03-09 16:55 ` mpolacek at gcc dot gnu.org
2015-03-17 20:29 ` mpolacek at gcc dot gnu.org
2015-03-20 17:46 ` mpolacek at gcc dot gnu.org
2015-04-22 12:02 ` jakub at gcc dot gnu.org
2015-04-23 14:35 ` mpolacek at gcc dot gnu.org
2015-07-16  9:19 ` rguenth at gcc dot gnu.org
2015-09-30 15:54 ` jsm28 at gcc dot gnu.org
2015-09-30 16:01 ` mpolacek at gcc dot gnu.org
2015-10-01 14:53 ` mpolacek at gcc dot gnu.org
2015-10-01 14:54 ` mpolacek at gcc dot gnu.org
2015-10-06  9:15 ` ebotcazou at gcc dot gnu.org
2015-10-06 10:26 ` ramana at gcc dot gnu.org
2015-10-06 11:13 ` ramana at gcc dot gnu.org
2015-10-06 15:10 ` ramana at gcc dot gnu.org
2015-10-06 15:31 ` uros at gcc dot gnu.org
2015-10-07  6:08 ` bernd.edlinger at hotmail dot de
2015-10-07  8:38 ` ramana at gcc dot gnu.org
2015-10-08  3:40 ` pinskia at gcc dot gnu.org
2015-10-08  7:50 ` krebbel 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-65345-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).