On 05/09/2017 09:39 AM, Richard Biener wrote:
On Tue, May 9, 2017 at 3:33 PM, Nathan Sidwell <nat...@acm.org> wrote:
I wondered if we'd get sane backtraces and what not, if the optimizer
thought such functions never barfed.
Well, I think you'd either ICE in the first check or can safely CSE the
second.
Done
--
Nathan Sidwell
2017-05-09 Nathan Sidwell <nat...@acm.org>
* tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
Index: tree.h
===================================================================
--- tree.h (revision 247784)
+++ tree.h (working copy)
@@ -4109,15 +4109,9 @@ extern int attribute_list_contained (con
extern int tree_int_cst_equal (const_tree, const_tree);
extern bool tree_fits_shwi_p (const_tree)
-#ifndef ENABLE_TREE_CHECKING
- ATTRIBUTE_PURE /* tree_fits_shwi_p is pure only when checking is disabled. */
-#endif
- ;
+ ATTRIBUTE_PURE;
extern bool tree_fits_uhwi_p (const_tree)
-#ifndef ENABLE_TREE_CHECKING
- ATTRIBUTE_PURE /* tree_fits_uhwi_p is pure only when checking is disabled. */
-#endif
- ;
+ ATTRIBUTE_PURE;
extern HOST_WIDE_INT tree_to_shwi (const_tree);
extern unsigned HOST_WIDE_INT tree_to_uhwi (const_tree);
#if !defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 4003)