First Last Prev Next    No search results available
Details
: [llvmg++] Crash compiling friend with default argument
Bug#: 447
: tools
: llvm-g++
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.4

: http://www.systemc.org
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Yiping Fan <fanyp@cs.ucla.edu>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments
The preproccessed cpp file (gzipped) (170.28 KB, application/x-gzip-compressed)
2004-09-29 12:26, Yiping Fan
Details


Note

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

Related actions


Description:   Opened: 2004-09-28 21:03
I tested two example designs in SystemC version 2.0.1, and the same failure 
occurs. I think it occurs during the headfile preprocessing. The message is as 
following:

....
/v/userc/fanyp/projects/SystemC/systemc-
2.0.1/include/systemc/datatypes/int/sc_unsigned.h:1939: internal compiler 
error: Segmentation fault
....


You can download the SystemC library (intrinsic C++) from: 
http://www.systemc.org/projects/systemc
------- Comment #1 From Chris Lattner 2004-09-28 21:05:13 -------
Can you please include a small preprocessed testcase that illustrates this bug? 

Thanks,

-Chris
------- Comment #2 From Yiping Fan 2004-09-29 12:26:17 -------
Created an attachment (id=176) [details]
The preproccessed cpp file (gzipped)
------- Comment #3 From Chris Lattner 2004-09-29 17:46:39 -------
Thanks for the testcase.  I'm looking into it, but note that it breaks after
emitting an error message.  Try fixing the error, and the segfault might go away.  

I'll try to get a more satisfactory answer for you though :)

-Chris
------- Comment #4 From Chris Lattner 2004-11-27 19:05:12 -------
Here is a reduced testcase:

namespace nm {
  struct str {
    friend int foo(int arg = 0);
  };
}
------- Comment #5 From Chris Lattner 2004-11-27 19:19:15 -------
Okay, this is sick.  After tracking down the bug, it turns out the GCC people
found the exact same problem, and reduced it down to exactly the same testcase:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13166

I will merge their patches into our C++ parser to fix the problem.

-Chris

First Last Prev Next    No search results available