gcc version 4.1.0 20050819 (experimental)
Target: alphaev68-unknown-linux-gnu

[EMAIL PROTECTED]:~/ecc% cat main.ii
struct S { };
S const s = S();
int main(){}
[EMAIL PROTECTED]:~/ecc% g++ main.ii   
[EMAIL PROTECTED]:~/ecc% g++ main.ii -g
/tmp/ccAquXQn.o:(.debug_info+0x150): undefined reference to `s'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:~/ecc% g++-4.0 main.ii -g 
[EMAIL PROTECTED]:~/ecc%

-- 
           Summary: "undefined reference" with -g and const empty struct
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to