Bug 51367 - [4.7 Regression] Broken diagnostic: 'pointer_type' not supported by dump_expr
Summary: [4.7 Regression] Broken diagnostic: 'pointer_type' not supported by dump_expr
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Paolo Carlini
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2011-11-30 21:29 UTC by Volker Reichelt
Modified: 2011-12-01 09:35 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-11-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2011-11-30 21:29:51 UTC
Trunk produces a broken diagnostic for the following code snippet:

========================================
template<typename T> void foo(T, T);

void bar(void* p)
{
  foo(0,p);
}
========================================

bug.cc: In function 'void bar(void*)':
bug.cc:5:10: error: no matching function for call to 'foo(int, void*&)'
bug.cc:5:10: note: candidate is:
bug.cc:1:27: note: template<class T> void foo(T, T)
bug.cc:1:27: note:   template argument deduction/substitution failed:
bug.cc:5:10: note:   conflicting deductions for parameter 'T' ('int' and '#'pointer_type' not supported by dump_expr#<expression error>')
Comment 1 Paolo Carlini 2011-11-30 21:46:03 UTC
Mine, this is caused by PR51230, for sure.
Comment 2 paolo@gcc.gnu.org 2011-12-01 09:34:47 UTC
Author: paolo
Date: Thu Dec  1 09:34:43 2011
New Revision: 181876

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181876
Log:
/cp
2011-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51367
	* pt.c (unify_inconsistency): Use either %qT or %qE depending on
	whether parm is a type or non-type parameter.

/cp
2011-12-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51367
	* g++.dg/template/error47.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/error47.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Paolo Carlini 2011-12-01 09:35:46 UTC
Fixed.