LWN.net Logo

Re: Linux 2.6.27.27

From:  Ian Lance Taylor <iant-AT-google.com>
To:  Krzysztof Oledzki <olel-AT-ans.pl>
Subject:  Re: Linux 2.6.27.27
Date:  Wed, 22 Jul 2009 08:36:21 -0700
Message-ID:  <m3k520buh6.fsf@google.com>
Cc:  Linus Torvalds <torvalds-AT-linux-foundation.org>, Troy Moure <twmoure-AT-szypr.net>, Greg KH <gregkh-AT-suse.de>, Linux Kernel Mailing List <linux-kernel-AT-vger.kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org>, stable-AT-kernel.org, lwn-AT-lwn.net
Archive-link:  Article, Thread

Krzysztof Oledzki <olel@ans.pl> writes:

> BTW: here is a simple testcase for this bug:
>
> --- fno-strict-overflow-fixed-bug.c ---
> #include <stdio.h>
>
> int main() {
>
>         unsigned char i;
>
>         for (i = 0; i < 128; i++)
>                 printf("loop %u\n", i);
>
>         return 0;
> }
> --- cut here ---

I can confirm that this is broken in gcc 4.2 using -fno-strict-overflow,
and works correctly in gcc 4.3 and later.  Sigh.

Ian


(Log in to post comments)

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds