Bug 34394

Summary: [4.2 regression] Broken diagnostic: 'abs_expr' not supported by dump_expr
Product: gcc Reporter: Volker Reichelt <reichelt>
Component: c++Assignee: Jakub Jelinek <jakub>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, ismail, pinskia
Priority: P3 Keywords: diagnostic, monitored
Version: 4.3.0   
Target Milestone: 4.3.0   
Host: Target:
Build: Known to work: 4.3.0
Known to fail: 4.2.5 Last reconfirmed: 2007-12-10 13:38:42

Description Volker Reichelt 2007-12-08 20:38:10 UTC
The C++ frontend issues a broken diagnostic for the following invalid
testcase since GCC 3.1:

==============================
extern double fabs(double);

void foo(double x)
{
  fabs(x)();
}
==============================

bug.cc: In function 'void foo(double)':
bug.cc:5: error: '#'abs_expr' not supported by dump_expr#<expression error>' cannot be used as a function
Comment 1 Andrew Pinski 2007-12-08 20:39:33 UTC
Confirmed.
Comment 2 Jakub Jelinek 2007-12-10 14:31:43 UTC
Subject: Bug 34394

Author: jakub
Date: Mon Dec 10 14:31:30 2007
New Revision: 130744

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130744
Log:
	PR c++/34394
	* error.c (dump_expr): Handle ABS_EXPR.

	* g++.dg/other/error22.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/error22.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/error.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Jakub Jelinek 2007-12-10 14:39:20 UTC
Fixed on the trunk.
Comment 4 Jakub Jelinek 2007-12-10 14:39:50 UTC
Oops, didn't mean to close this altogether.
Comment 5 Joseph S. Myers 2008-07-04 22:21:53 UTC
Closing 4.1 branch.
Comment 6 Joseph S. Myers 2009-03-31 01:40:15 UTC
Closing 4.2 branch, fixed in 4.3.