public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ernstberg@bigvalley.net
To: gcc-gnats@gcc.gnu.org
Subject: c/10176: Broken nested Do loop: simple example. gcc 3.2 redhat
Date: Fri, 21 Mar 2003 01:16:00 -0000	[thread overview]
Message-ID: <20030321011311.11064.qmail@sources.redhat.com> (raw)


>Number:         10176
>Category:       c
>Synopsis:       Broken nested Do loop: simple example. gcc 3.2 redhat
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 21 01:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     ernstberg@bigvallet.net
>Release:        gcc 3.2
>Organization:
>Environment:
Redhat Linux 8.0
amd athlon 2400 dual cpu msi motherboard k7d master L
>Description:

 I am a hobby programmer and if I am missing some point forgive me:

 Simple nested do loops. One version with a set of values works.
 Change the values for a second version and the outer loop fails to execute.
Working values are if( x % 2 ){ x *= 3; x += 3;} else x /= 2;
 Broken values are if( x % 3 ){ x *= 4; x += 2;} else x /= 3;

Working program is 3x.c
Broken program is 4x.c
>How-To-Repeat:

 Compile and run.
>Fix:

 I don't know but I have seen the nested do loop broken in a ported C program that worked okay under Amiga's Sas C as well.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="Broken_Do.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Broken_Do.tar.gz"

H4sICC9jej4AA0Jyb2tlbl9Eby50YXIA7VhLb+M2EPbV+hXTAIvGtWPrFSdZw0W3aYHmUhRNj73Q
EmUTK5ECSfnRRf57Zyh5/egj7SEbBOB3sC3NgzOfyfksJ9tx1nthhFEYTqdpL0TcnL0j4jCKengj
mabTKI5j8k+vb3oQvnRhhMZYpgF6P2op+L/4PWd/o5hMINkOE2Cm5pkFVYBdcUgmMRSNzKxQEhY7
wOaNhe+5XkKYXEV3V2EStJERet6rsmT2j0MEZc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RMMfUA9A69LyuVXUo+lFhblqB9PXh6wpWqqZLxzTmwRH0sWUbK2prpSW41qii
O44C33aYc3CCrcCIqi5pRxx+WATBP/0v8NpHxMPDw8PDw8PDw8PDw8PDw8PDw8PjTeJPy7ilOQAo
AAA=


             reply	other threads:[~2003-03-21  1:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-21  1:16 ernstberg [this message]
2003-03-21  1:51 bangerth
2003-03-21 15:04 bangerth

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=20030321011311.11064.qmail@sources.redhat.com \
    --to=ernstberg@bigvalley.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /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).