public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chung-Lin Tang <cltang@codesourcery.com>
To: "Koning, Paul" <Paul.Koning@dell.com>, Jakub Jelinek <jakub@redhat.com>
Cc: Tobias Burnus <tobias@codesourcery.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PING x2] Re: [PATCH, libgomp] Fix chunk_size<1 for dynamic schedule
Date: Fri, 9 Sep 2022 18:08:30 +0800	[thread overview]
Message-ID: <264c5146-7f8c-56f3-9e24-736855be365c@codesourcery.com> (raw)
In-Reply-To: <15b51f2d-80da-aca4-4bb2-ad6e03010b62@codesourcery.com>



On 2022/8/26 4:15 PM, Chung-Lin Tang wrote:
> On 2022/8/4 9:31 PM, Koning, Paul wrote:
>>
>>
>>> On Aug 4, 2022, at 9:17 AM, Chung-Lin Tang <cltang@codesourcery.com> wrote:
>>>
>>> On 2022/6/28 10:06 PM, Jakub Jelinek wrote:
>>>> On Thu, Jun 23, 2022 at 11:47:59PM +0800, Chung-Lin Tang wrote:
>>>>> with the way that chunk_size < 1 is handled for gomp_iter_dynamic_next:
>>>>>
>>>>> (1) chunk_size <= -1: wraps into large unsigned value, seems to work though.
>>>>> (2) chunk_size == 0:  infinite loop
>>>>>
>>>>> The (2) behavior is obviously not desired. This patch fixes this by changing
>>>> Why?  It is a user error, undefined behavior, we shouldn't slow down valid
>>>> code for users who don't bother reading the standard.
>>>
>>> This is loop init code, not per-iteration. The overhead really isn't that much.
>>>
>>> The question should be, if GCC having infinite loop behavior is reasonable,
>>> even if it is undefined in the spec.
>>
>> I wouldn't think so.  The way I see "undefined code" is that you can't complain about "wrong code" produced by the compiler.  But for the compiler to malfunction on wrong input is an entirely differerent matter.  For one thing, it's hard to fix your code if the compiler fails.  How would you locate the offending source line?
>>
>> 	paul
> 
> Ping?

Ping x2.

  reply	other threads:[~2022-09-09 10:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 15:47 Chung-Lin Tang
2022-06-28 14:06 ` Jakub Jelinek
2022-06-28 15:07   ` Jakub Jelinek
2022-08-04 13:17   ` Chung-Lin Tang
2022-08-04 13:31     ` Koning, Paul
2022-08-26  8:15       ` [PING] " Chung-Lin Tang
2022-09-09 10:08         ` Chung-Lin Tang [this message]
2022-09-13 14:07     ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264c5146-7f8c-56f3-9e24-736855be365c@codesourcery.com \
    --to=cltang@codesourcery.com \
    --cc=Paul.Koning@dell.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).