Bug 175528
| Summary: | Bad: internal compiler error when using typeof | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Li Jie <cpunion> |
| Component: | gcc4 | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 4 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-12-12 12:30:51 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
That's a well known upstream bug. No point to track it here separately. |
From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; Poco 0.31; .NET CLR 1.1.4322; .NET CLR 2.0.50215) Description of problem: I write this code: template <class T, class U> typeof(T() > U() ? T() : U()) MaX (const T& t, const U& u) { return t > u ? t : u; } int main () { int a = MaX(3, (short)5); double b = MaX(5, 3.5); return 0; } It has some errors when compiling: test.cpp: In function â⬘__typeof__ (((T() > U()) ? T() : U())) MaX(const T&, const U&) [with T = int, U = int]â⬙: test.cpp:8: internal compiler error: in write_type, at cp/mangle.c:1646 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/ccdZk5dN.out file, please attach this to your bugreport. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. save the code to "test.cpp" 2. run "g++ -o test test.cpp Additional info: