This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/7373: g++ 3.0 and 3.1 miscompile certain uses of the ternary operator


>Number:         7373
>Category:       c++
>Synopsis:       g++ 3.0 and 3.1 miscompile certain uses of the ternary operator
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 22 09:06:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dr. Johannes Ruscheinski
>Release:        gcc versions 3.0.4 and 3.1.1-0pre3
>Organization:
>Environment:
Debian sid on 80x86, Linux 2.4.19-pre8
>Description:
Comiling the supplied tiny test program (g++-3.0 test.cc) results in the following linker errors (binutils version 2.12.90.0.14-1):
/tmp/ccKTBRxn.o: In function `main':
/tmp/ccKTBRxn.o(.text+0x17): undefined reference to `Fred::BIT1'
/tmp/ccKTBRxn.o(.text+0x21): undefined reference to `Fred::BIT2'
collect2: ld returned 1 exit status
>How-To-Repeat:
Compile the test program with *no* command line flags and version 3.0.4 (Debian 3.0.4-12 or 3.1.1-0pre3) and observe the linker error messages.
>Fix:
Unknown.  Sorry I'm an application programmer and don't know anything about the compiler internals.  I'd love to learn about it though :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc"

c3RydWN0IEZyZWQgewoJc3RhdGljIGNvbnN0IHVuc2lnbmVkIEJJVDEgPSAxOwoJc3RhdGljIGNv
bnN0IHVuc2lnbmVkIEJJVDIgPSAyOwp9OwoKCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2
W10pCnsKCXVuc2lnbmVkIG1hc2soYXJnYyA/IEZyZWQ6OkJJVDEgOiBGcmVkOjpCSVQyKTsKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]