From: "Martin Liška" <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Cc: Richard Biener <richard.guenther@gmail.com>,
Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] Reset proper type on vector types (PR middle-end/88587).
Date: Wed, 16 Jan 2019 09:26:00 -0000 [thread overview]
Message-ID: <65b91fc9-fcf5-8b73-94dc-2a16317fc59c@suse.cz> (raw)
In-Reply-To: <0d2f9afa-b0fb-b81b-aba4-1f7f1faa5f35@suse.cz>
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
And there's patch with Richi's validation check that he provided.
It fails on following 2 tests in test-suite:
$ ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/pr68674.c
DECL_MODE BLK vs TYPE_MODE V8SI [V8SI]: a
...
$ ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/i386/pr80583.c -c
DECL_MODE BLK vs TYPE_MODE V8SI [V8SI]: a
...
In both cases we access a global variable from a function with a different target
attributes. I guess Honza has seen that in inliner.
What to do with these, can it be potentially dangerous?
Thanks,
Martin
[-- Attachment #2: 0001-Sanitize-about-VECTOR_TYPEs.patch --]
[-- Type: text/x-patch, Size: 1049 bytes --]
From bf22210f96a2ead9d50e351102f095aadf9d879f Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 16 Jan 2019 09:05:21 +0100
Subject: [PATCH] Sanitize about VECTOR_TYPEs.
---
gcc/tree-cfg.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 6041f4208b0..fc1dd36fbb7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5108,6 +5108,17 @@ verify_node_sharing_1 (tree *tp, int *walk_subtrees, void *data)
{
hash_set<void *> *visited = (hash_set<void *> *) data;
+ if (DECL_P (*tp)
+ && VECTOR_TYPE_P (TREE_TYPE (*tp))
+ && DECL_MODE (*tp) != TYPE_MODE (TREE_TYPE (*tp)))
+ {
+ fprintf (stderr, "DECL_MODE %s vs TYPE_MODE %s [%s]: ",
+ mode_name[DECL_MODE (*tp)],
+ mode_name[TYPE_MODE (TREE_TYPE (*tp))],
+ mode_name[TYPE_MODE_RAW (TREE_TYPE (*tp))]);
+ print_generic_expr (stderr, *tp);
+ fprintf (stderr, "\n");
+ }
if (tree_node_can_be_shared (*tp))
{
*walk_subtrees = false;
--
2.20.1
next prev parent reply other threads:[~2019-01-16 9:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 9:20 Martin Liška
2019-01-16 9:26 ` Martin Liška [this message]
2019-01-16 11:50 ` Richard Biener
2019-01-16 11:59 ` Jakub Jelinek
2019-01-16 12:01 ` Richard Biener
2019-01-16 12:06 ` Richard Biener
2019-01-17 11:21 ` Martin Liška
2019-01-17 12:51 ` Richard Biener
2019-01-18 14:25 ` H.J. Lu
2019-01-18 14:30 ` H.J. Lu
2019-04-15 6:50 ` Martin Liška
2019-04-15 7:50 ` Richard Biener
2019-04-15 8:11 ` Martin Liška
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=65b91fc9-fcf5-8b73-94dc-2a16317fc59c@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=richard.guenther@gmail.com \
/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).