Bug 171201 - wrong class instantiated
Summary: wrong class instantiated
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gcc   
(Show other bugs)
Version: 4.0
Hardware: All Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Andrew Haley
QA Contact:
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks: 173278
TreeView+ depends on / blocked
 
Reported: 2005-10-19 12:25 UTC by Andrew Cagney
Modified: 2010-07-27 12:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-27 12:11:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 2270 None None None Never
GNU Compiler Collection 24442 None None None Never

Description Andrew Cagney 2005-10-19 12:25:47 UTC
public class SameName
{
    public Object foo ()
    {
        class SingleName
        {
            public String toString ()
            {
                return "foo.SingleName";
            }
        }
        return new SingleName ();
    }
    public Object bar ()
    {
        class SingleName
        {
            public String toString ()
            {
                throw new RuntimeException ("bar.SingleName");
            }
        }
        return new SingleName ();
    }
    public static void main (String[] args)
    {
        System.out.println (new SameName ().foo().toString());
    }
}

cagney@localhost$ ./a.out
Exception in thread "main" java.lang.RuntimeException: bar.SingleName
   at SameName$2$SingleName.toString() (Unknown Source)
   at SameName.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

Comment 1 Andrew Haley 2005-10-19 13:02:21 UTC
Redirected to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24442

Comment 2 Andrew Cagney 2005-11-09 19:25:31 UTC
Unfortunatly upstream doesn't fix RHEL 4.


Comment 6 Red Hat Bugzilla 2007-02-05 19:00:30 UTC
REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.


Note You need to log in before you can comment on or make changes to this bug.