public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59956] New: internal compiler error: unexpected expression ‘P_S’ of kind template_parm_index
@ 2014-01-27 12:58 chretien at lirmm dot fr
  2014-01-27 13:17 ` [Bug c++/59956] " trippels at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: chretien at lirmm dot fr @ 2014-01-27 12:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59956

            Bug ID: 59956
           Summary: internal compiler error: unexpected expression ‘P_S’
                    of kind template_parm_index
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chretien at lirmm dot fr

Created attachment 31961
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31961&action=edit
repro code

I get the following internal compiler error with g++ 4.8.2 and the attached
repro code:

gcc_ice.cpp: In instantiation of ‘class Foo<float, 5>’:
gcc_ice.cpp:35:28:   required from here
gcc_ice.cpp:28:17: internal compiler error: unexpected expression ‘P_S’ of kind
template_parm_index
  friend void Bar<U, P_S, A_S>::impl (const Foo<U,P_S>& poly);
              ^

This was tested on Arch Linux (x86_64).

$ g++ --version
g++ (GCC) 4.8.2 20131219 (prerelease)
>From gcc-bugs-return-441609-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jan 27 13:13:19 2014
Return-Path: <gcc-bugs-return-441609-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 7464 invoked by alias); 27 Jan 2014 13:13:18 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 7074 invoked by uid 48); 27 Jan 2014 13:13:13 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/59957] New: ICE in read_line_num when re-#define-ing a -DVAR=...
Date: Mon, 27 Jan 2014 13:13:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter
Message-ID: <bug-59957-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-01/txt/msg02751.txt.bz2
Content-length: 1373

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY957

            Bug ID: 59957
           Summary: ICE in read_line_num when re-#define-ing a -DVAR=...
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

Running

  gcc -c -DNDEBUG=1 test.c

on the following code will give an ICE:

  #ifndef DEBUG
  #define NDEBUG  /* Re-define NDEBUG - should warn but not ICE  */
  #endif
  #include <assert.h>


will give an ICE with 4.9:


0xfa2248 read_line_num
        ../../gcc/input.c:603
0xfa2248 location_get_source_line(expanded_location, int*)
        ../../gcc/input.c:702
0xf9cf4b diagnostic_show_locus(diagnostic_context*, diagnostic_info const*)
        ../../gcc/diagnostic.c:304
0xf9df8b diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.c:800
0x635024 c_cpp_error(cpp_reader*, int, int, unsigned int, unsigned int, char
const*, __va_list_tag (*) [1])
        ../../gcc/c-family/c-common.c:9639
0xfac796 cpp_error_with_line(cpp_reader*, int, unsigned int, unsigned int, char
const*, ...)
        ../../libcpp/errors.c:163
0xfbc7ef _cpp_create_definition
        ../../libcpp/macro.c:3124


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

end of thread, other threads:[~2014-08-01 18:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-27 12:58 [Bug c++/59956] New: internal compiler error: unexpected expression ‘P_S’ of kind template_parm_index chretien at lirmm dot fr
2014-01-27 13:17 ` [Bug c++/59956] " trippels at gcc dot gnu.org
2014-01-27 19:31 ` trippels at gcc dot gnu.org
2014-01-28 15:53 ` trippels at gcc dot gnu.org
2014-01-29 16:52 ` jason at gcc dot gnu.org
2014-01-29 20:34 ` [Bug c++/59956] [4.8/4.9 regression] " jason at gcc dot gnu.org
2014-01-29 20:45 ` jason at gcc dot gnu.org
2014-01-29 21:29 ` [Bug c++/59956] [4.8 " jason at gcc dot gnu.org
2014-05-22  9:05 ` rguenth at gcc dot gnu.org
2014-08-01 18:34 ` jason at gcc dot gnu.org
2014-08-01 18:35 ` jason 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).