public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "meadori at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/39246] FAIL: gcc.dg/uninit-13.c
Date: Wed, 19 Jun 2013 20:24:00 -0000	[thread overview]
Message-ID: <bug-39246-4-p9sva4CLnE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-39246-4@http.gcc.gnu.org/bugzilla/>

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

meadori at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |meadori at gcc dot gnu.org

--- Comment #10 from meadori at gcc dot gnu.org ---
I just bumped into this again while looking through some XFAILS.
I think Andreas' analysis is correct, but I am not sure how to
fix the problem.

Note that for ARM that the test passes for '-mfloat-abi=hard'.

For `arm-none-eabi-gcc -O -Wuninitialized` we get:

original
========

{
  C f;

    C f;
  IMAGPART_EXPR <f> = 0.0;
  return f;
}

gimple
======

foo ()
{
  float D.4063;
  C f;

  ; NOTE: The partial store was promoted to a total store which
  ; introduces the 'REALPART_EXPR <f>' bit.
  D.4063 = REALPART_EXPR <f>;
  f = COMPLEX_EXPR <D.4063, 0.0>;
  <retval> = f;
  return <retval>;
}

cplxlower1
==========

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  f$real_2 = f$real_6(D);
  f_3 = COMPLEX_EXPR <f$real_2, 0.0>;
  REALPART_EXPR <<retval>> = f$real_2;
  IMAGPART_EXPR <<retval>> = 0.0;
  return <retval>;

}

dce2
====

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  ; NOTE: Warning about unused variable on next statement, which is
  ; associated with the 'C f;' declaration because the statements
  ; below as introduced by cplxlower1 don't have any location info.
  REALPART_EXPR <<retval>> = f$real_6(D);
  IMAGPART_EXPR <<retval>> = 0.0;
  return <retval>;

}

For `arm-none-eabi-gcc -O -Wuninitialized -mfloat-abi=hard` things are very
similar until we get to complex lowering:

gimple
======

foo ()
{
  float D.4062;
  C D.4063;
  C f;

  ; NOTE: The partial store was promoted to a total store which
  ; introduces the 'REALPART_EXPR <f>' bit.
  D.4062 = REALPART_EXPR <f>;
  f = COMPLEX_EXPR <D.4062, 0.0>;
  D.4063 = f;
  return D.4063;
}

cplxlower1
==========

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  f$real_2 = f$real_5(D);
  f_3 = COMPLEX_EXPR <f$real_2, 0.0>;
  return f_3;

}

dce2
====

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  ; NOTE: Warning about unused variable on next statement,
  ; which is associated with the '__imag__ f = 0;' line.
  f_3 = COMPLEX_EXPR <f$real_5(D), 0.0>;
  return f_3;

}


  parent reply	other threads:[~2013-06-19 20:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-39246-4@http.gcc.gnu.org/bugzilla/>
2011-02-25 14:51 ` krebbel at gcc dot gnu.org
2011-02-25 15:52 ` rguenth at gcc dot gnu.org
2011-03-01 18:08 ` krebbel at gcc dot gnu.org
2011-03-01 18:09 ` jingyu at google dot com
2012-01-24 21:59 ` pinskia at gcc dot gnu.org
2012-01-24 22:00 ` pinskia at gcc dot gnu.org
2013-06-19 20:24 ` meadori at gcc dot gnu.org [this message]
2013-06-19 21:00 ` manu at gcc dot gnu.org
2014-05-04  9:53 ` thomas.preudhomme at arm dot com
2014-05-04  9:54 ` StaffLeavers at arm dot com
2014-05-04  9:54 ` StaffLeavers at arm dot com
2014-05-04  9:55 ` StaffLeavers at arm dot com
2014-05-04  9:56 ` StaffLeavers at arm dot com
2014-05-04  9:57 ` StaffLeavers at arm dot com
2014-05-04  9:57 ` StaffLeavers at arm dot com
2014-05-04  9:58 ` StaffLeavers at arm dot com
2014-05-04  9:59 ` StaffLeavers at arm dot com
2014-05-04 10:00 ` StaffLeavers at arm dot com
2014-05-04 10:01 ` StaffLeavers at arm dot com
2014-05-04 10:02 ` StaffLeavers at arm dot com
2014-05-04 10:02 ` StaffLeavers at arm dot com
2014-05-04 10:04 ` StaffLeavers at arm dot com
2014-05-04 10:05 ` StaffLeavers at arm dot com
2014-05-04 10:06 ` StaffLeavers at arm dot com
2014-05-04 10:06 ` StaffLeavers at arm dot com
2014-05-04 10:08 ` StaffLeavers at arm dot com
2014-05-04 10:09 ` StaffLeavers at arm dot com
2014-05-04 10:10 ` StaffLeavers at arm dot com
2014-05-04 10:11 ` StaffLeavers at arm dot com
2014-05-04 10:12 ` StaffLeavers at arm dot com
2014-05-04 10:12 ` StaffLeavers at arm dot com
2014-05-08  1:19 ` jye2 at gcc dot gnu.org
2014-05-08  1:21 ` jye2 at gcc dot gnu.org
2014-05-08  1:23 ` jye2 at gcc dot gnu.org
2015-01-27  1:42 ` thopre01 at gcc dot gnu.org
2009-02-19 16:44 [Bug c/39246] New: " danglin at gcc dot gnu dot org
2009-04-15 20:41 ` [Bug middle-end/39246] " jingyu at google dot com
2009-05-13 10:08 ` ramana at gcc dot gnu dot org
2009-10-17 22:09 ` mikpe at it dot uu dot se

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-39246-4-p9sva4CLnE@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).