[Bug target/100884] Comparing unsigned 32 bit integer values generates 64 bit compare instructions when optimized

2021-06-17 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100884 m farazma changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/100884] Comparing unsigned 32 bit integer values generates 64 bit compare instructions when optimized

2021-06-17 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100884 --- Comment #1 from m farazma --- The development team has mentioned this is correct behaviour, according to PPC ABI the returning function needs to sign or zero extend the result when necessary: https://refspecs.linuxfoundation.org/ELF/ppc64/PP

[Bug c++/100884] New: Comparing unsigned 32 bit integer values generates 64 bit compare instructions when optimized

2021-06-02 Thread mfarazma.ext at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- **0.c** ``` #include uint32_t codegen(); int main(){ uint32_t expected = (codegen()) != 0 ? -1

[Bug c++/100641] Link error when using extern thread_local variables on AIX

2021-05-17 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100641 --- Comment #1 from m farazma --- Issue seems to be similar to this older gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59364

[Bug c++/100641] New: Link error when using extern thread_local variables on AIX

2021-05-17 Thread mfarazma.ext at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- Declaring a variable as "extern thread_local" in a C++ program leads to: "ERROR: Undefined symbol: TLS init function

[Bug c++/97914] New: -fno-delete-null-pointer-checks not working properly with constexpr

2020-11-19 Thread mfarazma.ext at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- Compiling this code: ``` constexpr int test(const int *arr) { if(arr == 0){ // } return 5; } int main(){ static

[Bug c++/97913] New: -fno-delete-null-pointer-checks not working properly with constexpr

2020-11-19 Thread mfarazma.ext at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- Compiling this code: ``` constexpr int test(const int *arr) { if(arr == 0){ // } return 5; } int main(){ static

[Bug target/97086] aix: ceilf and truncf do not preserve the sign bit when output is rounded to 0

2020-10-13 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086 --- Comment #3 from m farazma --- Sorry the above example needs to be changed to this in order to reproduce the bug: ``` #include #include int main(){ float a = -0.0; std::cout << nearbyintf(a) << std::endl; return 0; } ```

[Bug target/97086] aix: ceilf and truncf do not preserve the sign bit when output is rounded to 0

2020-10-13 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97086 --- Comment #2 from m farazma --- Wanted to point out the same happens when using "nearbyint": ``` #include #include int main(){ std::cout << nearbyintf(-0) << std::endl; return 0; } ``` expected: -0 actual: 0 https://en.cppreference.com/w/

[Bug c++/97266] "enum constant in boolean context" warning seems incorrect

2020-10-02 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266 --- Comment #6 from m farazma --- (In reply to Jonathan Wakely from comment #5) > Neither of those cases are constants, and the warning documentation (and the > actual diagnostic itself) talk about constants. > > But there's still no warning for

[Bug c++/97266] "enum constant in boolean context" warning seems incorrect

2020-10-01 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266 --- Comment #4 from m farazma --- (In reply to Jonathan Wakely from comment #3) > No, the type is ValidateFlag. It has an underlying type of int8_t, but that > just means it has the same size and range of values as int8_t. It's not > actually tha

[Bug c++/97266] "enum constant in boolean context" warning seems incorrect

2020-10-01 Thread mfarazma.ext at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97266 --- Comment #2 from m farazma --- (In reply to Jonathan Wakely from comment #1) > (In reply to m farazma from comment #0) > > ``` > > #include > > > > enum ValidateFlag : int8_t { > >a = 0, b , c > > }; > > > > int main(){ > > bool t =

[Bug c++/97266] New: "enum constant in boolean context" warning seems incorrect

2020-10-01 Thread mfarazma.ext at gmail dot com via Gcc-bugs
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- ``` #include enum ValidateFlag : int8_t { a = 0, b , c }; int main(){ bool t = static_cast(c); return sta

[Bug c++/97086] New: aix: ceilf and truncf do not preserve the sign bit when output is rounded to 0

2020-09-17 Thread mfarazma.ext at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mfarazma.ext at gmail dot com Target Milestone: --- Test program: #include #include int main(){ float input = -0.1; printf("%f\n",