This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/60832] add pretty-printer code for double-int/wide-int
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Sep 2015 10:11:56 +0000
- Subject: [Bug middle-end/60832] add pretty-printer code for double-int/wide-int
- Auto-submitted: auto-generated
- References: <bug-60832-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60832
--- Comment #2 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
Author: manu
Date: Mon Sep 21 10:11:24 2015
New Revision: 227964
URL: https://gcc.gnu.org/viewcvs?rev=227964&root=gcc&view=rev
Log:
[PR middle-end/60832] Do not convert widest_int to tree just for printing it.
In do_warn_aggressive_loop_optimizations, we convert to a tree just to print a
widest_int. Apart from overly complicated, this results in printing '3u'
instead of just '3'.
Unfortunately, adding a printf-like conversion specifier would require making
pretty-print.c link with wide-int.cc, which will include a lot of new
dependencies into several other programs (gcov-tool for example). It would be
possible to add the conversion specifier to every FE pretty-printer, but this
still would require updating c-format.c, which is far from trivial. A simpler
approach is to convert to a string rather than to a tree.
In addition, "iteration 3 invokes undefined behavior within this loop" seems to
me clearer than "iteration 3 invokes undefined behavior; containing loop".
gcc/testsuite/ChangeLog:
2015-09-21 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
PR middle-end/60832
* gcc.dg/pr53265.c: Update.
gcc/ChangeLog:
2015-09-21 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
PR middle-end/60832
* tree-ssa-loop-niter.c (do_warn_aggressive_loop_optimizations):
Print i_bound without converting it to a tree.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/pr53265.c
trunk/gcc/tree-ssa-loop-niter.c