[Bug rtl-optimization/82677] Many projects (linux, coreutils, GMP, gcrypt, openSSL, etc) are misusing asm(divq/divl) etc, potentially resulting in faulty/unintended optimisations
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Mon Oct 23 13:20:00 GMT 2017
- Previous message (by thread): [Bug rtl-optimization/82677] Many projects (linux, coreutils, GMP, gcrypt, openSSL, etc) are misusing asm(divq/divl) etc, potentially resulting in faulty/unintended optimisations
- Next message (by thread): [Bug rtl-optimization/82677] Many projects (linux, coreutils, GMP, gcrypt, openSSL, etc) are misusing asm(divq/divl) etc, potentially resulting in faulty/unintended optimisations
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82677
--- Comment #7 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 23 Oct 2017, infinity0 at pwned dot gg wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82677
>
> --- Comment #6 from infinity0 at pwned dot gg ---
> What I mean is, even if you do change GCC to fix the unintended optimisation,
> other projects' code are *still wrong* - it's only correct if you can assume
> the C compiler is optimising your code in a very specific way, that happens to
> safe for the specific sorts of "side effects" that div instructions do.
You still have to mark stmts with side-effects as volatile.
Conditional side-effects are tricky to get correct of course.
- Previous message (by thread): [Bug rtl-optimization/82677] Many projects (linux, coreutils, GMP, gcrypt, openSSL, etc) are misusing asm(divq/divl) etc, potentially resulting in faulty/unintended optimisations
- Next message (by thread): [Bug rtl-optimization/82677] Many projects (linux, coreutils, GMP, gcrypt, openSSL, etc) are misusing asm(divq/divl) etc, potentially resulting in faulty/unintended optimisations
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Gcc-bugs
mailing list