Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 156185 - Internal compiler error in c_expand_expr, at c-common.c:3830
Summary: Internal compiler error in c_expand_expr, at c-common.c:3830
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 161600 168424
TreeView+ depends on / blocked
 
Reported: 2005-04-28 09:44 UTC by Karljohan Lundin
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHBA-2006-0147
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-15 15:28:02 UTC


Attachments (Terms of Use)
Code that produce internal error (deleted)
2005-04-28 09:46 UTC, Karljohan Lundin
no flags Details
Working code (deleted)
2005-04-28 09:48 UTC, Karljohan Lundin
no flags Details
Preprocessed source (deleted)
2005-04-28 09:50 UTC, Karljohan Lundin
no flags Details
Backport of patch that fixes the bug (deleted)
2005-09-26 20:17 UTC, Alexandre Oliva
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0147 qe-ready SHIPPED_LIVE gcc bug fix update 2006-03-14 05:00:00 UTC

Description Karljohan Lundin 2005-04-28 09:44:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

Description of problem:
When compiling a piece of code that use a static construction with a static template member function without referencing the class to which this function is a member, the compiler produce an internal error.

Version-Release number of selected component (if applicable):
gcc-3.2.3-47

How reproducible:
Always

Steps to Reproduce:
1. Compile the enclosed code
2.
3.
  

Actual Results:  The enclosed code does not compile, but generates an internal error from the compiler.

Expected Results:  Either the compiler should (on line 17) accept the newInstance function as the function in class C or it should complain about the function not being declared in the current (global) scope.

Additional info:

The code compiles fine on my i686 linux computer with gcc (GCC) 3.3.5 on Debian unstable.

Error message:

[user@host program]$ make bugtest
g++     bugtest.cpp   -o bugtest
bugtest.cpp: In function `void __static_initialization_and_destruction_0(int,
   int)':
bugtest.cpp:17: Internal compiler error in c_expand_expr, at c-common.c:3830
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
Preprocessed source stored into /tmp/ccU3MlcH.out file, please attach this to your bugreport.
make: *** [bugtest] Error 1

Comment 1 Karljohan Lundin 2005-04-28 09:46:27 UTC
Created attachment 113761 [details]
Code that produce internal error

Comment 2 Karljohan Lundin 2005-04-28 09:48:08 UTC
Created attachment 113762 [details]
Working code

In this file a static reference to the member function is made, which compiles
without error.

Comment 3 Karljohan Lundin 2005-04-28 09:50:28 UTC
Created attachment 113763 [details]
Preprocessed source

Comment 4 Alexandre Oliva 2005-09-26 20:17:52 UTC
Created attachment 119274 [details]
Backport of patch that fixes the bug

This patch enables us to correctly restore the bindings of overloaded member
functions when bringing a class bindings back into scope for unqualified
lookup.

Comment 10 Red Hat Bugzilla 2006-03-15 15:28:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0147.html



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