public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "david dot kirkby at onetel dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/40757] gcc 4.4.0 miscompiles mpfr-2.4.1
Date: Sat, 18 Jul 2009 01:14:00 -0000 [thread overview]
Message-ID: <20090718011409.11297.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40757-16207@http.gcc.gnu.org/bugzilla/>
------- Comment #20 from david dot kirkby at onetel dot net 2009-07-18 01:14 -------
(In reply to comment #19)
> (In reply to comment #18)
> > I've compiled and linked that code. It does not abort.
>
> Bad point for this theory :-(
> The result could still depend on the alignment of the pointer, so you could try
> replacing buf[0] by buf[4] and calling memset(buf+4,...) (try several small
> values instead of 4).
>
I tried this in a loop. It still works, with no abort.
typedef __SIZE_TYPE__ size_t;
extern void *memset (void *, const void *, size_t);
extern void abort (void);
volatile size_t i = 0x80000000U, j = 0x80000000U;
char buf[16];
int main (void)
{
int n;
for (n=0 ; n <=64;++n) {
if (sizeof (size_t) != 4)
return 0;
buf[n] = 6;
memset (buf+n, 0, i + j);
if (buf[0] != 6)
abort ();
}
return 0;
}
I extended 'n' to larger values and find it does abort when it is 5592, but not
exactly the 'small' value you were looking for.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40757
next prev parent reply other threads:[~2009-07-18 1:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 0:36 [Bug c/40757] New: " zimmerma+gcc at loria dot fr
2009-07-15 2:02 ` [Bug c/40757] " zimmerma+gcc at loria dot fr
2009-07-15 6:27 ` ebotcazou at gcc dot gnu dot org
2009-07-15 9:55 ` rguenth at gcc dot gnu dot org
2009-07-15 13:15 ` mikpe at it dot uu dot se
2009-07-16 7:52 ` zimmerma+gcc at loria dot fr
2009-07-16 8:31 ` mikpe at it dot uu dot se
2009-07-16 10:19 ` david dot kirkby at onetel dot net
2009-07-16 10:24 ` david dot kirkby at onetel dot net
2009-07-16 10:31 ` jakub at gcc dot gnu dot org
2009-07-16 12:32 ` david dot kirkby at onetel dot net
2009-07-16 14:07 ` jakub at gcc dot gnu dot org
2009-07-16 20:34 ` marc dot glisse at normalesup dot org
2009-07-16 21:29 ` david dot kirkby at onetel dot net
2009-07-17 0:58 ` zimmerma+gcc at loria dot fr
2009-07-17 3:22 ` david dot kirkby at onetel dot net
2009-07-17 4:11 ` david dot kirkby at onetel dot net
2009-07-17 7:49 ` jakub at gcc dot gnu dot org
2009-07-17 11:19 ` david dot kirkby at onetel dot net
2009-07-17 15:51 ` marc dot glisse at normalesup dot org
2009-07-18 1:14 ` david dot kirkby at onetel dot net [this message]
2009-07-18 1:18 ` david dot kirkby at onetel dot net
2009-07-18 4:50 ` marc dot glisse at normalesup dot org
2009-07-18 14:36 ` david dot kirkby at onetel dot net
2009-07-18 14:44 ` david dot kirkby at onetel dot net
2009-07-18 19:33 ` david dot kirkby at onetel dot net
2009-10-01 8:34 ` [Bug target/40757] " david dot kirkby at onetel dot net
2009-10-04 11:01 ` ebotcazou at gcc dot gnu dot org
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=20090718011409.11297.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).