From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103040 invoked by alias); 4 Nov 2015 19:36:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 103030 invoked by uid 89); 4 Nov 2015 19:36:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: resqmta-po-01v.sys.comcast.net Received: from resqmta-po-01v.sys.comcast.net (HELO resqmta-po-01v.sys.comcast.net) (96.114.154.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 04 Nov 2015 19:36:11 +0000 Received: from resomta-po-14v.sys.comcast.net ([96.114.154.238]) by resqmta-po-01v.sys.comcast.net with comcast id dXak1r00458ss0Y01Xc9Ya; Wed, 04 Nov 2015 19:36:09 +0000 Received: from [IPv6:2001:558:6045:a4:40c6:7199:cd03:b02d] ([IPv6:2001:558:6045:a4:40c6:7199:cd03:b02d]) by resomta-po-14v.sys.comcast.net with comcast id dXc71r00W2ztT3H01Xc8WA; Wed, 04 Nov 2015 19:36:09 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [ping] Fix PR debug/66728 From: Mike Stump In-Reply-To: Date: Wed, 04 Nov 2015 19:36:00 -0000 Cc: Richard Sandiford , Bernd Schmidt , Ulrich Weigand , GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: <8AEB7496-7440-4239-95E9-272C6EF2AB70@comcast.net> References: <20151028115839.1E7C85C3D@oc7340732750.ibm.com> <87ziz3ta4t.fsf@e105548-lin.cambridge.arm.com> <5630D8AE.1090608@redhat.com> <87h9l4v2pi.fsf@e105548-lin.cambridge.arm.com> <87611kuzz4.fsf@e105548-lin.cambridge.arm.com> <871tc8unnx.fsf@e105548-lin.cambridge.arm.com> <87wptztqpx.fsf@e105548-lin.cambridge.arm.com> <29C8CB44-A0EC-4A9A-A4D3-3ABB6D66DA5B@comcast.net> <7ADD4B03-BF3E-48BA-8028-AC5EB50E773C@comcast.net> To: Richard Biener X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00393.txt.bz2 On Nov 4, 2015, at 4:15 AM, Richard Biener wro= te: > I wonder if we'll manage to to get mode_for_size return BLKmode > in case of an original mode that was not of a size multiple of > HOST_BITS_PER_WIDE_INT (and that's host dependent even=85). > We probably should use smallest_mode_for_size on a precision > derived from the value Once we want to go stomping around the value, we might as well just do ever= ything. I prefer this version over one that has a call to assert. I thoug= ht about creating a helper function, but since there is only 1 client for i= t, and since it was only 4 lines, I didn=92t create one. I=92d propose def= erring creation until we have more clients. The generated dwarf remains fi= xed, as expected. > Please use gcc_checking_assert here. Done. My test suite run with the assert did finish, and on x86_64 linux, i= t was never hit. Any other issues you can spot? Index: dwarf2out.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- dwarf2out.c (revision 229720) +++ dwarf2out.c (working copy) @@ -15593,8 +15593,13 @@ return true; =20 case CONST_WIDE_INT: - add_AT_wide (die, DW_AT_const_value, - std::make_pair (rtl, GET_MODE (rtl))); + { + wide_int w1 =3D std::make_pair (rtl, MAX_MODE_INT); + int prec =3D MIN (wi::min_precision (w1, UNSIGNED), + (unsigned int)CONST_WIDE_INT_NUNITS (rtl) * HOST_BITS_PER_WIDE_INT); + wide_int w =3D wide_int::from (w1, prec, UNSIGNED); + add_AT_wide (die, DW_AT_const_value, w); + } return true; =20 case CONST_DOUBLE: Index: rtl.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- rtl.h (revision 229720) +++ rtl.h (working copy) @@ -2086,6 +2086,7 @@ inline unsigned int wi::int_traits ::get_precision (const rtx_mode_t &x) { + gcc_checking_assert (x.second !=3D BLKmode && x.second !=3D VOIDmode); return GET_MODE_PRECISION (x.second); } =20