public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tobi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/19334] ISHFT has the wrong type for constant values
Date: Sun, 09 Jan 2005 12:29:00 -0000	[thread overview]
Message-ID: <20050109122948.29737.qmail@sourceware.org> (raw)
In-Reply-To: <20050108200509.19334.pinskia@gcc.gnu.org>


------- Additional Comments From tobi at gcc dot gnu dot org  2005-01-09 12:29 -------
Hm,

I've instrumented the tree-dumper to print the widths and signednesses of
integer constants, i.e.
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.52
diff -u -p -r2.52 tree-pretty-print.c
--- tree-pretty-print.c 9 Dec 2004 10:54:36 -0000       2.52
+++ tree-pretty-print.c 9 Jan 2005 12:20:44 -0000
@@ -532,6 +532,18 @@ dump_generic_node (pretty_printer *buffe
        }
       else
        pp_wide_integer (buffer, TREE_INT_CST_LOW (node));
+
+      if (tree_int_cst_sgn (TYPE_MIN_VALUE (TREE_TYPE (node))) < 0)
+       {
+         /* signed type.  */
+         pp_string (buffer, "_S");
+       }
+      else
+       {
+         /* unsigned type.  */
+         pp_string (buffer, "_U");
+       }
+      pp_wide_integer (buffer, TYPE_PRECISION (TREE_TYPE (node)));
       break;

     case REAL_CST:

now for gfortran both with and without my patch I get:
[tobi@marktplatz tests]$ cat pr19334.f90.t02.original
MAIN__ ()
{
  int1 k;

  {
    int1 C.454 = 0_S8;

    c_i1 (&C.454);
  }
}


c_i1 (i)
{
  (void) 0_U32;


which looks correct.  The same goes for the optimized dump:
[tobi@marktplatz tests]$ cat pr19334.f90.t63.optimized

;; Function MAIN__ (MAIN__)

Analyzing Edge Insertions.
MAIN__ ()
{
  int1 C.454 = 0_S8;
  int1 k;

<bb 0>:
  c_i1 (&C.454);
  return;

}



;; Function c_i1 (c_i1__)

Analyzing Edge Insertions.
c_i1 (i)
{
<bb 0>:
  return;

}


Maybe this is an optimizer issue? Or is there something else I should be looking
for?

-- 


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


  parent reply	other threads:[~2005-01-09 12:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-08 20:05 [Bug fortran/19334] New: " pinskia at gcc dot gnu dot org
2005-01-08 20:07 ` [Bug fortran/19334] " pinskia at gcc dot gnu dot org
2005-01-08 20:33 ` pinskia at gcc dot gnu dot org
2005-01-08 20:33 ` pinskia at gcc dot gnu dot org
2005-01-08 20:47 ` tobi at gcc dot gnu dot org
2005-01-09  2:16 ` pinskia at gcc dot gnu dot org
2005-01-09 11:57 ` tobi at gcc dot gnu dot org
2005-01-09 12:29 ` tobi at gcc dot gnu dot org [this message]
2005-01-09 12:30 ` tobi at gcc dot gnu dot org
2005-01-09 15:29 ` pinskia at gcc dot gnu dot org
2005-01-09 15:36 ` Tobias dot Schlueter at physik dot uni-muenchen dot de
2005-01-09 15:47 ` [Bug target/19334] " pinskia at gcc dot gnu dot org
2005-01-09 16:51 ` coudert at clipper dot ens dot fr
2005-01-09 19:21 ` [Bug target/19334] darwin backend places some CONST_DECLs in the wrong section pinskia at gcc dot gnu dot org
2005-01-09 19:28 ` tobi at gcc dot gnu dot org
2005-01-09 19:31 ` pinskia at gcc dot gnu dot org
2005-01-09 20:07 ` pinskia at gcc dot gnu dot org
2005-01-13  0:47 ` pinskia at gcc dot gnu dot org
2005-01-13  0:48 ` cvs-commit 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=20050109122948.29737.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).