Bug 60409 - [4.9 Regression] [c++1y] ICE on valid with template function
Summary: [4.9 Regression] [c++1y] ICE on valid with template function
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.9.0
: P1 normal
Target Milestone: 4.9.0
Assignee: Jason Merrill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-04 11:16 UTC by Paolo Carlini
Modified: 2024-04-02 11:17 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-03-04 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Carlini 2014-03-04 11:16:01 UTC
ICE with -std=c++1y for:

struct A
{
  void foo();
};

template<typename T> void bar(T)
{
  (A().foo)();
}
Comment 1 Jakub Jelinek 2014-03-05 14:26:46 UTC
Started with r197248.
Comment 2 Jason Merrill 2014-03-05 19:26:09 UTC
Author: jason
Date: Wed Mar  5 19:25:37 2014
New Revision: 208352

URL: http://gcc.gnu.org/viewcvs?rev=208352&root=gcc&view=rev
Log:
	PR c++/60409
	* semantics.c (force_paren_expr): Only add a PAREN_EXPR to a
	dependent expression.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/regress1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
Comment 3 Jason Merrill 2014-03-05 19:31:46 UTC
Fixed.