public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/47359] Recursive functions of intrinsic names generates invalid assembler
Date: Sat, 06 Jun 2015 16:13:00 -0000	[thread overview]
Message-ID: <bug-47359-4-eQkv2IF27B@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47359-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47359

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Sat Jun  6 16:12:39 2015
New Revision: 224190

URL: https://gcc.gnu.org/viewcvs?rev=224190&root=gcc&view=rev
Log:
2015-06-06  Thomas Koenig  <tkoenig@netcologne.de>

        PR fortran/47359
        * arith.c (eval_intrinsic_op): Set warn flag for
        gfc_type_convert_binary if -Wconversion or -Wconversion-extra
        are set.
        (wprecision_real_real): New function.
        (wprecision_int_real): New function.
        (gfc_int2int): If -fno-range-check and -Wconversion are specified
        and it is a narrowing conversion, warn.
        (gfc_int2real): If there is a change in value for the conversion,
        warn.
        (gfc_int2complex):  Likewise.
        (gfc_real2int): If there is a fractional part to the real number,
        warn with -Wconversion, otherwise warn with -Wconversion-extra.
        (gfc_real2real): Emit warning if the constant was changed by
        conversion with either -Wconversion or -Wconversion-extra.  With
        -Wconversion-extra, warn if no warning was issued earlier.
        (gfc_real2complex):  Likewise.
        (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
        there was an imaginary part, warn; otherwise, warn for change in
        value.  Warn with -Wconversion-extra if no other warning was
        issued.
        (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
        there was an imaginary part, warn; otherwise, warn for change in
        value. Warn with -Wconversion-extra if no other warning was
        issued.
        (gfc_complex2complex):  For -Wconversion, warn if the value of
        either the real or the imaginary part was changed.  Warn for
        -Wconversion-extra if no prior warning was issued.
        * expr.c (gfc_check_assign):  Remove check for change in value.
        * primary.c (match_real_constant): For -Wconversion-extra, check
        against a number in which the last non-zero digit has been
        replaced with a zero.  If the number compares equal, warn.
        * intrinsic.c (gfc_convert_type_warn):  Do not warn about constant
        conversions.

2015-06-06  Thomas Koenig  <tkoenig@netcologne.de>

        PR fortran/47359
        * gfortran.dg/array_constructor_type_17.f03: Adjust error message.
        * gfortran.dg/warn_conversion.f90: Add warning for change in value
        for assignment.
        * gfortran.dg/warn_conversion_3.f90: Add warnings.
        * gfortran.dg/warn_conversion_5.f90: New test.
        * gfortran.dg/warn_conversion_6.f90: New test.
        * gfortran.dg/warn_conversion_7.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_5.f90
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_6.f90
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_7.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/arith.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/array_constructor_type_17.f03
    trunk/gcc/testsuite/gfortran.dg/warn_conversion.f90
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_3.f90


  parent reply	other threads:[~2015-06-06 16:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 12:24 [Bug fortran/47359] New: " roger.ferrer at bsc dot es
2011-01-19 20:53 ` [Bug fortran/47359] " dominiq at lps dot ens.fr
2011-05-23 10:39 ` dominiq at lps dot ens.fr
2015-05-04 15:21 ` fxcoudert at gcc dot gnu.org
2015-06-06 16:13 ` tkoenig at gcc dot gnu.org [this message]
2015-06-06 16:16 ` tkoenig at gcc dot gnu.org
2015-06-06 18:23 ` tkoenig at gcc dot gnu.org
2022-05-16 20:38 ` anlauf at gcc dot gnu.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=bug-47359-4-eQkv2IF27B@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).