public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/53732] [4.7/4.8 Regression] "mismatching comparison operand types" on compile
Date: Wed, 20 Jun 2012 16:40:00 -0000	[thread overview]
Message-ID: <bug-53732-4-UsEidSaMDK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53732-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |wrong-code
                 CC|                            |burnus at gcc dot gnu.org
   Target Milestone|---                         |4.7.2

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-06-20 16:40:05 UTC ---
The problem is the following code in trans-array.c's gfc_add_loop_ss_code:

      switch (ss_info->type)
        {
        case GFC_SS_SCALAR:
...
          gfc_conv_expr (&se, expr);

Here, expr is "0.0d0", which is properly converted. However:

          if (expr->ts.type != BT_CHARACTER)
            {
              /* Move the evaluation of scalar expressions outside the
                 scalarization loop, except for WHERE assignments.  */
              if (subscript)
                se.expr = convert(gfc_array_index_type, se.expr);

As subscript is true, the "0.0d0" gets converted to the integer "0".


  parent reply	other threads:[~2012-06-20 16:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 14:55 [Bug fortran/53732] New: " minzastro at yandex dot ru
2012-06-20 15:03 ` [Bug fortran/53732] [4.7/4.8 Regression] " dominiq at lps dot ens.fr
2012-06-20 16:40 ` burnus at gcc dot gnu.org [this message]
2012-06-20 17:19 ` burnus at gcc dot gnu.org
2012-06-20 20:41 ` mikael at gcc dot gnu.org
2012-06-21 12:49 ` mikael at gcc dot gnu.org
2012-06-21 15:08 ` dominiq at lps dot ens.fr
2012-06-21 20:33 ` dominiq at lps dot ens.fr
2012-06-22 11:24 ` mikael at gcc dot gnu.org
2012-07-05 15:18 ` mikael at gcc dot gnu.org
2012-07-06 19:51 ` mikael at gcc dot gnu.org
2012-07-06 19:54 ` mikael at gcc dot gnu.org
2012-12-18 16:40 ` dominiq at lps dot ens.fr

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-53732-4-UsEidSaMDK@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).