public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "richardn26 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/51744] New: Erroneous warning: memset used with constant zero length parameter
Date: Tue, 03 Jan 2012 20:05:00 -0000	[thread overview]
Message-ID: <bug-51744-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             Bug #: 51744
           Summary: Erroneous warning: memset used with constant zero
                    length parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: richardn26@gmail.com


Created attachment 26233
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26233
concatated ma2.i and ma2_test.i from -save-temps ma2.c and ma2_test.c

Attached code gives erroneous warning when compiled with -
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -c ma2.c
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -c ma2_test.c
gcc -O3 -flto -Wall -Wextra -D_FORTIFY_SOURCE=2 -o ma2_test ma2_test.o ma2.o
ma2.o (symbol from plugin): warning: memset used with constant zero length
parameter; this could be due to transposed parameters

Compiling without -flto or without -D_FORTIFY_SOURCE=2 does not give warning.
Generated code seems to work ok anyway.


             reply	other threads:[~2012-01-03 20:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 20:05 richardn26 at gmail dot com [this message]
2012-01-04 10:31 ` [Bug lto/51744] " rguenth at gcc dot gnu.org
2012-10-23 16:42 ` mark at infocomm dot com
2012-10-23 16:43 ` mark at infocomm dot com
2014-03-21  8:58 ` rguenth at gcc dot gnu.org
2014-03-21  9:00 ` rguenth at gcc dot gnu.org
2014-03-21  9:03 ` rguenth at gcc dot gnu.org
2014-03-24 11:22 ` rguenth at gcc dot gnu.org
2014-03-24 11:49 ` mark at infocomm dot com
2014-03-24 12:14 ` rguenth at gcc dot gnu.org
2014-03-24 12:32 ` mark at infocomm dot com
2014-03-24 13:55 ` rguenth at gcc dot gnu.org
2014-08-07  1:05 ` amodra at gmail dot com

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=bug-51744-4@http.gcc.gnu.org/bugzilla/ \
    --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).