[Bug target/85744] Returning INT_FAST64_MIN become zero

2018-05-11 Thread cerlane at nscc dot sg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85744

--- Comment #7 from cerlane  ---
(In reply to Jonathan Wakely from comment #5)
> You should have read https://gcc.gnu.org/bugs/ which explains what we need
> for a valid bug report, and would have done that before reporting it.
> 
> You probably forgot to declare the function in the calling code so the
> compiler assumed it returned int, and only used the low 32 bits, which are
> all zero.

No that is not true. I have the function declared in the header file. It is
included everywhere.
The problem is harder to debug. For all other #values, they work correctly. I
still can't figure out the issue. I tested every combination including compiler
flags before my last reply. If it turns out to be a compiler issue, I will
resubmit. Thanks.

[Bug target/85744] Returning INT_FAST64_MIN become zero

2018-05-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85744

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Jonathan Wakely  ---
Sorry, I didn't mean to change the status, re-closing.

[Bug target/85744] Returning INT_FAST64_MIN become zero

2018-05-11 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85744

Jonathan Wakely  changed:

   What|Removed |Added

 Status|RESOLVED|WAITING
   Last reconfirmed||2018-05-11
 Resolution|INVALID |---
 Ever confirmed|0   |1

--- Comment #5 from Jonathan Wakely  ---
You should have read https://gcc.gnu.org/bugs/ which explains what we need for
a valid bug report, and would have done that before reporting it.

You probably forgot to declare the function in the calling code so the compiler
assumed it returned int, and only used the low 32 bits, which are all zero.

[Bug target/85744] Returning INT_FAST64_MIN become zero

2018-05-11 Thread cerlane at nscc dot sg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85744

cerlane  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from cerlane  ---
(In reply to Andrew Pinski from comment #3)
> Can you provide the preprocessed source then?

To provide the preprocessed source, I extracted the function and call it
directly from the same file. It then returns the correct value. However, when I
called the "actual" function, which is in an archive, I reproduce the error. 

This means it is not a gcc standard error, but a compilation or some other
issues. I am unsure if this is the correct place to continue the discussion.

Thanks very much for your very quick response in any case.

[Bug target/85744] Returning INT_FAST64_MIN become zero

2018-05-10 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85744

Andrew Pinski  changed:

   What|Removed |Added

  Component|c   |target

--- Comment #3 from Andrew Pinski  ---
Can you provide the preprocessed source then?