AVR C Runtime Library - Bugs: bug #48765, math.h: isfinite might generate...
You are not allowed to post comments on this tracker with your current authentication level.
bug #48765: math.h: isfinite might generate wrong code due to early-clobber
Submitter: | Georg-Johann Lay <gjlayde> | ||
Submitted: | Fri 12 Aug 2016 04:59:39 PM UTC | ||
Category: | None | Severity: | 4 - Important |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | Confirmed | Percent Complete: | 0% |
Assigned to: | None | Open/Closed: | Open |
Release: | 2.0.0 | Fixed Release: | None |
Fri 12 Aug 2016 08:41:02 PM UTC, comment #3: |
Chris Pavlina <c4757p>![]() |
Fri 12 Aug 2016 08:34:58 PM UTC, comment #2: No, that's not how GCC inline assembler works. The only constraints on the registers are:
|
Georg-Johann Lay <gjlayde> |
Fri 12 Aug 2016 07:51:57 PM UTC, comment #1: I'm not so sure. %C1 and %D1 are defined as bytes of __x, and %0 is __exp - surely the compiler should keep those separate as they are separate variables existing in the same scope?
|
Chris Pavlina <c4757p>![]() |
Fri 12 Aug 2016 04:59:39 PM UTC, original submission:
Skimming math.h I came across the following implementation of isfinie:
|
Georg-Johann Lay <gjlayde> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Okay, your example proves me wrong. Yes, this is indeed a potential bug.
The proposed replacement looks good to me.
Thank you for your report.