c++/2028: option -finstrument-functions breaks valid code
schmitt@4sc.com
schmitt@4sc.com
Mon Feb 19 08:56:00 GMT 2001
>Number: 2028
>Category: c++
>Synopsis: option -finstrument-functions breaks valid code
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 19 08:56:02 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: schmitt@4sc.com
>Release: unknown-1.0
>Organization:
>Environment:
g++ 2.96, RH Linux 7.0 with Kernel 2.2.16-22
>Description:
when compiling a simple program with the -finstrument-functions option, the attached code doesn't
work anymore.
the function getX() returns NAN where it should return
the value x
>How-To-Repeat:
g++ -Wall -finstrument-functions -o test1 test1.cpp
as opposed to
g++ -Wall -o test1 test1.cpp
>Fix:
??? (haven't got the source of gcc, sorry)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test1.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test1.cpp"
I2luY2x1ZGUgPGlvc3RyZWFtPgoKY2xhc3MgYmxhOwoKY2xhc3MgYmxhIHsKcHVibGljOgoJYmxh
KGZsb2F0KTsKCWZsb2F0IGdldFgoKSBjb25zdDsKCWZyaWVuZCBvc3RyZWFtJiBvcGVyYXRvcjw8
IChvc3RyZWFtJiBvcywgY29uc3QgYmxhJik7Cgpwcm90ZWN0ZWQ6CglmbG9hdCB4Owp9OwoKYmxh
OjpibGEoZmxvYXQgbmV3eCkgOiB4KG5ld3gpIHsKfQoKZmxvYXQgYmxhOjpnZXRYKCkgY29uc3Qg
ewoJcmV0dXJuIHg7Cn0KCm9zdHJlYW0mIG9wZXJhdG9yPDwgKG9zdHJlYW0mIG9zLCBjb25zdCBi
bGEmIGFyZykgewoJb3MgPDwgYXJnLng7CglyZXR1cm4gb3M7Cn0KCmludCBtYWluKCkgewoJYmxh
IGJsdWJiKDIuMCk7Cgljb3V0IDw8ICJ3aXRoIG9wZXJhdG9yOiAiIDw8IGJsdWJiIDw8IGVuZGw7
Cgljb3V0IDw8ICJ3aXRoIGdldFgoKSAgOiAiIDw8IGJsdWJiLmdldFgoKSA8PCBlbmRsOwoJcmV0
dXJuIDA7Cn0K
More information about the Gcc-bugs
mailing list