optimization/4935: errno

liviu.coman@active-knowledge.com liviu.coman@active-knowledge.com
Wed Nov 14 11:14:00 GMT 2001


>Number:         4935
>Category:       optimization
>Synopsis:       errno
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 23 10:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     liviu.coman@active-knowledge.com
>Release:        3.0.2
>Organization:
>Environment:
Linux i386, Suse 7.2, kernel 2.4.4-4GB.
Options for configure were 
configure --with-gcc-version-trigger=/home/staff/coman/tmp/gcc-3.0.2/gcc/version.c --host=i686-pc-linux-gnu --prefix=/home/staff/coman/tmp/gcc --norecursion
>Description:
In my project I currently use gcc 3.0.2 as compiler and mathematical
functions(such as log10, sqrt, ...). I discovered when I use optimization zero 
zero and check if those functions had an wrong parameter by testing
errno, this is set properly. When I use any kind of optimization 
is not set properly for sqrt function. I used before gcc 2.95.2
and this bug was present for all mathematical function when
my code was compiled with optimization.

>How-To-Repeat:
Compile the source file with optimization level 0 and 2
and see the difference.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="errno.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="errno.cc"

I2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8Y2Vycm5vPgojaW5jbHVkZSA8aW9zdHJlYW0uaD4K
CmludCBtYWluKCkKewogIGRvdWJsZSByZXM9MC47CgogIGVycm5vID0gMDsKICBjZXJyIDw8Iisr
KysrKyBsb2cxMCBlcnJubz0iIDw8IGVycm5vIDw8IGVuZGw7ICAKICByZXM9bG9nMTAoLTEuMCk7
CiAgaWYoZXJybm8pCiAgewogICBjZXJyIDw8Ii0tLS0tLSBsb2cxMCBlcnJubz0iIDw8IGVycm5v
IDw8IGVuZGw7CiAgfQogIAogIGNlcnIgPDwiKioqKioqIGxvZzEwIGVycm5vPSIgPDwgZXJybm8g
PDwgZW5kbDsJCiAgCiAgZXJybm8gPSAwOwogIGNlcnIgPDwiKysrKysrIHNxcnQgZXJybm89IiA8
PCBlcnJubyA8PCBlbmRsOyAgICAKICByZXM9c3FydCgtMS4wKTsKICBpZihlcnJubykKICB7CiAg
IGNlcnIgPDwiLS0tLS0tIHNxcnQgZXJybm89IiA8PCBlcnJubyA8PCBlbmRsOwogIH0KICAKICBj
ZXJyIDw8IioqKioqKiBzcXJ0IGVycm5vPSIgPDwgZXJybm8gPDwgZW5kbDsJCn0K



More information about the Gcc-bugs mailing list