From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32169 invoked by alias); 20 Nov 2005 19:58:59 -0000 Received: (qmail 32161 invoked by uid 22791); 20 Nov 2005 19:58:58 -0000 X-Spam-Check-By: sourceware.org Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.195) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 20 Nov 2005 19:58:57 +0000 Received: by wproxy.gmail.com with SMTP id 55so687284wri for ; Sun, 20 Nov 2005 11:58:56 -0800 (PST) Received: by 10.65.11.20 with SMTP id o20mr2063839qbi; Sun, 20 Nov 2005 11:58:55 -0800 (PST) Received: from ?10.0.0.7? ( [201.42.113.233]) by mx.gmail.com with ESMTP id e17sm30365qba.2005.11.20.11.58.53; Sun, 20 Nov 2005 11:58:55 -0800 (PST) From: Rafael =?iso-8859-1?q?=C1vila_de_Esp=EDndola?= To: Jim Wilson Subject: Re: can DECL_RESULT be 0? Date: Sun, 20 Nov 2005 19:58:00 -0000 User-Agent: KMail/1.8.2 Cc: gcc@gcc.gnu.org References: <200511121006.08293.rafael.espindola@gmail.com> <200511151933.04687.rafael.espindola@gmail.com> <437D2FC9.6090009@specifix.com> In-Reply-To: <437D2FC9.6090009@specifix.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2577697.9OAtjOangQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511201801.59206.rafael.espindola@gmail.com> X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2005-11/txt/msg00946.txt.bz2 --nextPart2577697.9OAtjOangQ Content-Type: multipart/mixed; boundary="Boundary-01=_zYNgD5w7Nz0MP1D" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_zYNgD5w7Nz0MP1D Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Content-length: 212 On Thursday 17 November 2005 23:35, Jim Wilson wrote: > > I've checked in a patch to fix the comment typo. Thanks, What do you thing about adding an assert? Something similar to the attached= =20 patch. Rafael --Boundary-01=_zYNgD5w7Nz0MP1D Content-Type: text/x-diff; charset="iso-8859-1"; name="gcc-decl-result.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gcc-decl-result.patch" Content-length: 868 Index: gcc/function.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 --- gcc/function.c (revision 107249) +++ gcc/function.c (working copy) @@ -1711,8 +1711,11 @@ aggregate_value_p (tree exp, tree fntype { int i, regno, nregs; rtx reg; + tree type; =20 - tree type =3D (TYPE_P (exp)) ? exp : TREE_TYPE (exp); + gcc_assert (exp !=3D NULL_TREE); + + type =3D (TYPE_P (exp)) ? exp : TREE_TYPE (exp); =20 if (fntype) switch (TREE_CODE (fntype)) @@ -3805,6 +3808,7 @@ allocate_struct_function (tree fndecl) cfun->decl =3D fndecl; =20 result =3D DECL_RESULT (fndecl); + gcc_assert (result !=3D NULL_TREE); if (aggregate_value_p (result, fndecl)) { #ifdef PCC_STATIC_STRUCT_RETURN --Boundary-01=_zYNgD5w7Nz0MP1D-- --nextPart2577697.9OAtjOangQ Content-Type: application/pgp-signature Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDgNY3LlrfGJ8JUHwRAvRFAJ4o/zIC4evlvxy6g6p3BBbewHOFWwCeIVmL nSFRBr2drJHCDBYd8TEnh3w= =tyrp -----END PGP SIGNATURE----- --nextPart2577697.9OAtjOangQ--