From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3248 invoked by alias); 4 Apr 2005 14:25:11 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3009 invoked by uid 48); 4 Apr 2005 14:24:57 -0000 Date: Mon, 04 Apr 2005 14:25:00 -0000 From: "yanliu at ca dot ibm dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050404142435.20746.yanliu@ca.ibm.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/20746] New: Incorrect return value for covariant return function returning null ptr X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg00303.txt.bz2 List-Id: Using g++3.4.3 (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) to compile a testcase with covariant return types. In the testcase, the covariant function C::l() returns a null pointer, g++3.4.3 does the return value adjustment and returns a non-null return value ( which is incorrectly). Here is the steps to reproduce the problem and the execution result: >g++ t.C >a.out in C* C::l cp=0x8 -- Summary: Incorrect return value for covariant return function returning null ptr Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: yanliu at ca dot ibm dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20746