public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32135]  New: bogus array-ref fold triggering array overflow warning
@ 2007-05-29  0:02 mueller at gcc dot gnu dot org
  2007-05-29  0:11 ` [Bug middle-end/32135] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: mueller at gcc dot gnu dot org @ 2007-05-29  0:02 UTC (permalink / raw)
  To: gcc-bugs

Hi, 

-O2 Warray-bounds:

=== Cut ===
struct PhaseEntryType
{
  char raw_field[50 + 1];
};
int
ParsePhase (char in_cols[15][250], struct PhaseEntryType *P)
{
  __builtin_strncpy (P->raw_field, in_cols[2], 50);
}
~
=== Cut ===

triggered by 

  __builtin_strncpy ((char *) &P->raw_field, (const char *) (char *) in_cols +
500B, 50);

being gimplified to:
  D.1970 = &(*in_cols)[500];
  D.1971 = &P->raw_field[0];
  __builtin_strncpy (D.1971, D.1970, 50)


-- 
           Summary: bogus array-ref fold triggering array overflow warning
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mueller at gcc dot gnu dot org
  GCC host triplet: i686-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32135


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

end of thread, other threads:[~2008-01-13 14:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-29  0:02 [Bug c/32135] New: bogus array-ref fold triggering array overflow warning mueller at gcc dot gnu dot org
2007-05-29  0:11 ` [Bug middle-end/32135] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-05-29  9:21 ` rguenth at gcc dot gnu dot org
2007-06-29 18:38 ` mmitchel at gcc dot gnu dot org
2007-10-19 23:01 ` janis at gcc dot gnu dot org
2008-01-11 14:51 ` hubicka at gcc dot gnu dot org
2008-01-11 15:59 ` hubicka at gcc dot gnu dot org
2008-01-13 12:38 ` hubicka at gcc dot gnu dot org
2008-01-13 12:54 ` hubicka at gcc dot gnu dot org
2008-01-13 14:38 ` ismail at pardus dot org dot tr

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