public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aaron.mcdaid at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63522] [4.8/4.9/5 Regression] ICE: unexpected expression 'ElementIndices' of kind template_parm_index Date: Mon, 13 Jul 2015 17:31:00 -0000 [thread overview] Message-ID: <bug-63522-4-duPFEO2erG@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63522-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63522 aaron.mcdaid at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aaron.mcdaid at gmail dot com --- Comment #5 from aaron.mcdaid at gmail dot com --- Hi, In which versions has this been fixed? I'm running 4.9.3 and it crashes with this fragment. I had assumed that 4.9.3 was very up-to-date (as of July 2015). Perhaps this was fixed in the 5.x series and wasn't included in the recent 4.9.3 release? I also have a different piece of code that gives a very similar error. I'm not sure if I've found a new bug or not. In the following code, it will compile cleanly if I put a return statement inside function template `a`, or if I replace the return type with the simpler (non-decltype) version that is currently commented out. Otherwise it crashes with " unexpected expression ‘i’ of kind template_parm_index" ~/prefix-gcc-4.9.3/bin/g++ -std=c++11 -Wall -Wextra template<int i> struct int_c { static constexpr int value = i; }; template<int... c> struct Pack { }; template<int... i> static auto a() -> Pack< decltype(int_c<i>()) :: value ... > //Pack< int_c<i> :: value ... > { } int main() { a<0>(); } >From gcc-bugs-return-492173-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jul 13 18:48:36 2015 Return-Path: <gcc-bugs-return-492173-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 38984 invoked by alias); 13 Jul 2015 18:48:36 -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 38965 invoked by uid 48); 13 Jul 2015 18:48:32 -0000 From: "jb at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/66861] [5/6 Regression] Segmentation fault in gcc/testsuite/gfortran.dg/streamio_5.f90 Date: Mon, 13 Jul 2015 18:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 5.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jb at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: 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_status cf_reconfirmed_on everconfirmed Message-ID: <bug-66861-4-zg20ITswDb@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-66861-4@http.gcc.gnu.org/bugzilla/> References: <bug-66861-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: 2015-07/txt/msg01063.txt.bz2 Content-length: 926 https://gcc.gnu.org/bugzilla/show_bug.cgi?idf861 Janne Blomqvist <jb at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2015-07-13 Ever confirmed|0 |1 --- Comment #2 from Janne Blomqvist <jb at gcc dot gnu.org> --- Hmm, does the following patch fix it? diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index e5fc6e1..0048e24 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -1570,7 +1570,7 @@ find_file0 (gfc_unit *u, FIND_FILE0_DECL) } else # endif - if (strcmp (u->filename, path) == 0) + if (u->filename && strcmp (u->filename, path) == 0) return u; #endif (Sorry, I don't have a windows machine to test on myself..)
prev parent reply other threads:[~2015-07-13 17:31 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-63522-4@http.gcc.gnu.org/bugzilla/> 2014-10-15 13:03 ` [Bug c++/63522] [4.8/4.9/5] " mpolacek at gcc dot gnu.org 2014-12-10 13:14 ` rguenth at gcc dot gnu.org 2014-12-23 2:42 ` [Bug c++/63522] [4.8/4.9/5 Regression] " jason at gcc dot gnu.org 2015-01-09 11:30 ` rguenth at gcc dot gnu.org 2015-01-15 1:25 ` tbsaunde at gcc dot gnu.org 2015-01-28 17:39 ` jason at gcc dot gnu.org 2015-07-13 17:31 ` aaron.mcdaid at gmail dot com [this message]
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-63522-4-duPFEO2erG@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: linkBe 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).