From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Extend verify_type to check various uses of TYPE_MINVAL
Date: Mon, 04 May 2015 14:21:00 -0000 [thread overview]
Message-ID: <yddoam0iftr.fsf@lokon.CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <20150503160833.GA529@kam.mff.cuni.cz> (Jan Hubicka's message of "Sun, 3 May 2015 18:08:33 +0200")
Jan Hubicka <hubicka@ucw.cz> writes:
> Hi,
> this patch extends verify_type to check various uses of TYPE_MINVAL.
> I also added check that MIN_VALUE have compatible type with T:
> useless_type_conversion_p (const_cast <tree> (t), TREE_TYPE (TYPE_MIN_VALUE (t)))
> but that one fails interesting ways for C sizetype. I will try to look
> into this and thus this patch omits it.
>
> The main motivation is to check that various frontend overrides of TYPE_MINVAL
> are under control.
>
> Bootstrapped/regtested x86_64-linux, will commit it as obvious.
Not obvious enough, it seems: this patch broke gnat.dg/lto* tests at
least on i386-pc-solaris2.10. E.g.
FAIL: gnat.dg/lto1.adb (test for excess errors)
WARNING: gnat.dg/lto1.adb compilation failed to produce executable
FAIL: gnat.dg/lto1.adb (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gnat.dg/lto1_pkg.adb:23:1: error: TYPE_MIN_VALUE is not constant
<placeholder_expr feb2b9b0
type <integer_type fea16000 sizetype public unsigned SI
size <integer_cst fea041cc constant 32>
unit size <integer_cst fea041e0 constant 4>
align 32 symtab 0 alias set -1 canonical type fea16000 precision 32 min <integer_cst fea041f4 0> max <integer_cst fea04000 4294967295>>
>
<integer_type feb67ba0 lto1_pkg__Tfiltering_levels_tB___UB0
type <integer_type fea16000 sizetype public unsigned SI
size <integer_cst fea041cc constant 32>
unit size <integer_cst fea041e0 constant 4>
align 32 symtab 0 alias set -1 canonical type fea16000 precision 32 min <integer_cst fea041f4 0> max <integer_cst fea04000 4294967295>>
sizes-gimplified visited SI size <integer_cst fea041cc 32> unit size <integer_cst fea041e0 4>
align 32 symtab 0 alias set -1 canonical type feb67ba0 precision 32 min <placeholder_expr feb2b9b0> max <placeholder_expr feb2b9c0>
index type <integer_type feb67b40
type <enumeral_type feb67960 lto1_pkg__filtering_level_t sizes-gimplified visited unsigned QI
size <integer_cst fea042d0 constant 8>
unit size <integer_cst fea042e4 constant 1>
align 8 symtab 0 alias set -1 canonical type feb67960 precision 8 min <integer_cst feb60e4c 0> max <integer_cst feb60f3c 255>
values <tree_list feb648e8
purpose <identifier_node feb639d8 lto1_pkg__none>
value <integer_cst feb60e4c constant visited 0>
chain <tree_list feb64918
purpose <identifier_node feb639f4 lto1_pkg__pr_in_clutter>
value <integer_cst feb60f50 constant 1>
chain <tree_list feb64930
purpose <identifier_node feb63a10 lto1_pkg__ssr_plots>
value <integer_cst feb60f78 constant 2>
chain <tree_list feb64948 purpose <identifier_node feb63a2c lto1_pkg__pr_plots> value <integer_cst feb60fa0 3>>>>> context <translation_unit_decl fed805f0 D.18>
chain <type_decl feb687e8 lto1_pkg__filtering_level_t>>
QI size <integer_cst fea042d0 8> unit size <integer_cst fea042e4 1>
align 8 symtab 0 alias set -1 canonical type feb67b40 precision 8 min <integer_cst feb60e4c 0> max <integer_cst feb60fa0 3> RM min <component_ref feb63a9c> RM max <component_ref feb63ab8>>
chain <type_decl feb68a10 D.4194>>
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2015-05-04 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 16:08 Jan Hubicka
2015-05-04 14:21 ` Rainer Orth [this message]
2015-05-04 14:50 ` Eric Botcazou
2015-05-04 23:50 ` Jan Hubicka
2015-05-05 1:48 ` Jan Hubicka
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=yddoam0iftr.fsf@lokon.CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/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).