public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64980] [5 Regression] ICE in trans-expr.c
Date: Fri, 13 Feb 2015 19:01:00 -0000	[thread overview]
Message-ID: <bug-64980-4-LIHE2dkrZ1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64980-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Created attachment 34751
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34751&action=edit
Proposed Fix

OK, now I see the original test case exposes an aliasing violation
when node is passed to node._vptr->get_d_position(&node)

struct __class_muli_trapezium_Muli_trapezium_node_class_t_p node;

but

muli_trapezium_get_d_position (struct __class_muli_trapezium_Muli_trapezium_t_t
& restrict this)

So my previous patch is just not aggressive enough.

How about the attached patch, which looks like it simplifies the code.

I will post this new patch, which combines Mikael's patch and
fixes class_41.f03 and these test cases, by rewriting _all_ cases
where the class type is different, either because of different
attributes, or because of a derived base type even when the other
attributes are identical as in class_41.f03.

The call of get_d_position is now rewritten as follows:

  this.22 = VIEW_CONVERT_EXPR<struct
__class_muli_trapezium_Muli_trapezium_t_t>(node);
  D.3752 = node._vptr->get_d_position (&this.22);
  this.23 = VIEW_CONVERT_EXPR<struct
__class_muli_trapezium_Muli_trapezium_t_t>(node);
  D.3754 = &this.23;
  D.3755 = D.3754->_data->dim;
  D.3756 = (integer(kind=8)) D.3755 + -1;


Given the complexity of the generated code, it would be
good to have a positive test, instead of a compile-only test.

Could you please propose a positive test case for this?

Thanks,
Bernd.


  parent reply	other threads:[~2015-02-13 19:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-64980-4@http.gcc.gnu.org/bugzilla/>
2015-02-09 12:14 ` [Bug fortran/64980] [5.0 " janus at gcc dot gnu.org
2015-02-09 12:25 ` janus at gcc dot gnu.org
2015-02-09 13:05 ` dominiq at lps dot ens.fr
2015-02-09 13:45 ` mikael at gcc dot gnu.org
2015-02-09 14:35 ` [Bug fortran/64980] [5 " rguenth at gcc dot gnu.org
2015-02-09 15:57 ` mikael at gcc dot gnu.org
2015-02-12 21:20 ` bernd.edlinger at hotmail dot de
2015-02-13 11:22 ` dominiq at lps dot ens.fr
2015-02-13 19:01 ` bernd.edlinger at hotmail dot de [this message]
2015-02-13 20:03 ` mikael at gcc dot gnu.org
2015-02-13 21:10 ` bernd.edlinger at hotmail dot de
2015-02-14 12:28 ` mikael at gcc dot gnu.org
2015-02-14 15:08 ` dominiq at lps dot ens.fr
2015-02-14 17:45 ` mikael at gcc dot gnu.org
2015-02-14 17:49 ` mikael at gcc dot gnu.org
2015-02-14 21:30 ` bernd.edlinger at hotmail dot de
2015-02-15 12:30 ` bernd.edlinger at hotmail dot de
2015-02-16  7:32 ` dominiq at lps dot ens.fr
2015-02-16  7:54 ` bernd.edlinger at hotmail dot de
2015-02-16 13:55 ` dominiq at lps dot ens.fr
2015-02-16 19:44 ` bernd.edlinger at hotmail dot de
2015-02-22 19:45 ` edlinger at gcc dot gnu.org
2015-02-23 13:37 ` edlinger 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-64980-4-LIHE2dkrZ1@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).