This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/49914] New: call to abs(long long) in gcc/fold-const.c
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 30 Jul 2011 18:13:20 +0000
- Subject: [Bug other/49914] New: call to abs(long long) in gcc/fold-const.c
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49914
Summary: call to abs(long long) in gcc/fold-const.c
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: marc.glisse@normalesup.org
Hello,
in gcc/fold-const.c (currently line 7051), in function
fold_plusminus_mult_expr:
if (exact_log2 (abs (int11)) > 0 && int01 % int11 == 0
where int11 is a HOST_WIDE_INT. Is this call to abs safe? A few lines above,
abs is computed as x>=0?x:-x.
(don't know how to classify this, but it causes a build failure for me with a
C++98 compiler (ambiguous))