[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-02-17 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #11 from algrant at acm dot org --- Where do you get that this is racy if the access to data is not atomic? By design, release/acquire and release/consume sequences don't require wholesale changes to the way the data payload

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-02-17 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #13 from algrant at acm dot org --- I see what you mean - there is a race if threadB reads the data when the flag is not set, i.e. in the case when the read value is never used. Moving the read of data after the test

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-01-20 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #6 from algrant at acm dot org --- Here is a complete C++11 test case. The code generated for the two loads in thread B doesn't maintain the required ordering: ... ldrbw1, [x0] uxtbw1, w1 adrp

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2014-01-20 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #8 from algrant at acm dot org --- I don't see how f can not be 0 or 1 here, but to make this even more clear that there is no UB, define flag this way: static std::atomicunsigned int flag(0); and calculate the address this way

[Bug middle-end/59448] Code generation doesn't respect C11 address-dependency

2013-12-12 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #4 from algrant at acm dot org --- So using g++, #include atomic int f1(std::atomicint const *p, std::atomicint const *q) { int flag = p-load(std::memory_order_consume); return flag ? (q + flag - flag)-load(std

[Bug target/59448] New: ARM code generation doesn't respect C11 address-dependency

2013-12-10 Thread algrant at acm dot org
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: algrant at acm dot org int f2(int const *p, int const *q) { int flag = *p; return flag ? *(q + flag - flag) : 0; } The evaluation *(q + flag - flag) is ordered after *p

[Bug c/59448] Code generation doesn't respect C11 address-dependency

2013-12-10 Thread algrant at acm dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59448 --- Comment #2 from algrant at acm dot org --- Just realised that that last example is bogus, it should read: inline int const *makedep(int const *a, ...) { return a; } // variadic int f3(int const *p, int const *q) { int flag = *p

[Bug c/39488] ARM ABI: enum comparison against zero optimized away

2009-03-18 Thread algrant at acm dot org
--- Comment #2 from algrant at acm dot org 2009-03-18 09:45 --- No, the enum is signed, see AAPCS 7.1.3: the container type is int unless the upper bound is greater than 2147483647. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39488

[Bug c/39488] New: ARM ABI: enum comparison against zero optimized away

2009-03-18 Thread algrant at acm dot org
Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org GCC target triplet: arm-none-eabi-gcc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39488

[Bug c/39430] New: GCC does not put 'const auto' structure on the stack

2009-03-11 Thread algrant at acm dot org
not put 'const auto' structure on the stack Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http

[Bug c++/39415] New: static_cast used as downcast can silently lose const

2009-03-09 Thread algrant at acm dot org
Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39415

[Bug c/39383] sizeof object with zero-length array ignores initializer

2009-03-06 Thread algrant at acm dot org
--- Comment #6 from algrant at acm dot org 2009-03-06 14:44 --- Right. The existence of a statically initialized object whose size can be determined at compile-time to be larger than the (notional) type size, is specific to GCC. Here's another thing: the assembler output shows

[Bug c/39383] New: sizeof object with zero-length array ignores initializer

2009-03-05 Thread algrant at acm dot org
Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39383

[Bug c/39383] sizeof object with zero-length array ignores initializer

2009-03-05 Thread algrant at acm dot org
--- Comment #2 from algrant at acm dot org 2009-03-05 13:19 --- No, the case is an extension to C. 6.5.3.4 was obviously written without this case in mind. In this case the size... of its operand cannot be determined from the type. Either sizeof doesn't return the (real) size

[Bug c/39384] New: sizeof object with zero-length array ignores initializer

2009-03-05 Thread algrant at acm dot org
Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39384

[Bug c/39384] sizeof object with zero-length array ignores initializer

2009-03-05 Thread algrant at acm dot org
--- Comment #1 from algrant at acm dot org 2009-03-05 14:48 --- Unwanted duplicate entry of 39383 caused by refreshing browser page. *** This bug has been marked as a duplicate of 39383 *** -- algrant at acm dot org changed: What|Removed |Added

[Bug c/39383] sizeof object with zero-length array ignores initializer

2009-03-05 Thread algrant at acm dot org
--- Comment #5 from algrant at acm dot org 2009-03-05 14:48 --- *** Bug 39384 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39383

[Bug c/38397] New: gcc -E -dD changes the meaning of source

2008-12-04 Thread algrant at acm dot org
Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38397

[Bug c++/37697] New: dynamic_cast to void cv* wrongly allowed with -fno-rtti

2008-10-01 Thread algrant at acm dot org
: algrant at acm dot org GCC target triplet: ARM http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37697

[Bug c++/37701] New: dynamic_cast to void cv* wrongly allowed with -fno-rtti

2008-10-01 Thread algrant at acm dot org
: algrant at acm dot org GCC target triplet: ARM http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37701

[Bug c++/37697] dynamic_cast to void cv* wrongly allowed with -fno-rtti

2008-10-01 Thread algrant at acm dot org
--- Comment #1 from algrant at acm dot org 2008-10-01 15:35 --- *** Bug 37701 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37697

[Bug c++/37701] dynamic_cast to void cv* wrongly allowed with -fno-rtti

2008-10-01 Thread algrant at acm dot org
--- Comment #1 from algrant at acm dot org 2008-10-01 15:35 --- *** This bug has been marked as a duplicate of 37697 *** -- algrant at acm dot org changed: What|Removed |Added

[Bug c++/37697] dynamic_cast to void cv* wrongly allowed with -fno-rtti

2008-10-01 Thread algrant at acm dot org
--- Comment #2 from algrant at acm dot org 2008-10-01 16:40 --- Bug report in error. -- algrant at acm dot org changed: What|Removed |Added Status

[Bug c++/36685] New: clarify/diagnose use of weak constant

2008-07-01 Thread algrant at acm dot org
ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36685

[Bug c++/36685] clarify/diagnose use of weak constant

2008-07-01 Thread algrant at acm dot org
--- Comment #1 from algrant at acm dot org 2008-07-01 10:21 --- Similar argument applies to __attribute__((visibility(default))) . -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36685

[Bug c++/27141] [4.0/4.1/4.2 Regression] Unexpected requirement for usual deallocation function

2006-05-02 Thread algrant at acm dot org
--- Comment #2 from algrant at acm dot org 2006-05-02 07:20 --- Actually, I now wonder if the g++ 4.1 behavior would be correct by the proposed resolution of (still open) Core Language Issue 252. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27141

[Bug c++/27141] New: Unexpected requirement for usual deallocation function

2006-04-13 Thread algrant at acm dot org
Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: algrant at acm dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27141

[Bug c/26841] New: extern inline fails to create external definition in C99 mode

2006-03-24 Thread algrant at acm dot org
dot gnu dot org ReportedBy: algrant at acm dot org GCC build triplet: -std=c99 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26841

[Bug c++/21025] New: ICE on template

2005-04-14 Thread algrant at acm dot org
dot gnu dot org ReportedBy: algrant at acm dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21025