public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/49914] New: call to abs(long long) in gcc/fold-const.c
@ 2011-07-30 18:13 marc.glisse at normalesup dot org
  2011-07-30 18:29 ` [Bug other/49914] " marc.glisse at normalesup dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-07-30 18:13 UTC (permalink / raw)
  To: gcc-bugs

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))


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-08-02 20:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-30 18:13 [Bug other/49914] New: call to abs(long long) in gcc/fold-const.c marc.glisse at normalesup dot org
2011-07-30 18:29 ` [Bug other/49914] " marc.glisse at normalesup dot org
2011-07-31  9:46 ` [Bug bootstrap/49914] " rguenth at gcc dot gnu.org
2011-08-01 16:37 ` paolo.carlini at oracle dot com
2011-08-01 16:45 ` joseph at codesourcery dot com
2011-08-01 16:57 ` paolo.carlini at oracle dot com
2011-08-01 17:21 ` paolo.carlini at oracle dot com
2011-08-01 19:48 ` paolo.carlini at oracle dot com
2011-08-02  8:41 ` rguenther at suse dot de
2011-08-02  8:43 ` rguenther at suse dot de
2011-08-02 12:33 ` joseph at codesourcery dot com
2011-08-02 20:28 ` paolo at gcc dot gnu.org
2011-08-02 20:32 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).