public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Pop Sébastian" <pop@gauvain.u-strasbg.fr> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c++/7754: ICE SIGSEGV on union with template parameter Date: Sun, 29 Sep 2002 01:36:00 -0000 [thread overview] Message-ID: <20020929083601.10660.qmail@sources.redhat.com> (raw) The following reply was made to PR c++/7754; it has been noted by GNATS. From: =?iso-8859-1?Q?Pop_S=E9bastian?= <pop@gauvain.u-strasbg.fr> To: nathan@gcc.gnu.org, dv@vollmann.ch, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: aoliva@redhat.com Subject: Re: c++/7754: ICE SIGSEGV on union with template parameter Date: Sun, 29 Sep 2002 10:29:05 +0200 On Fri, Sep 13, 2002 at 09:04:23PM -0000, nathan@gcc.gnu.org wrote: > Synopsis: ICE SIGSEGV on union with template parameter > > State-Changed-From-To: open->analyzed > State-Changed-By: nathan > State-Changed-When: Fri Sep 13 14:04:22 2002 > State-Changed-Why: > confirmed as a regression > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7754 SIGSEGV happens in tree.c: /* Nonzero if integer constants T1 and T2 represent values that satisfy <. The precise way of comparison depends on their data type. */ int tree_int_cst_lt (t1, t2) tree t1, t2; { if (t1 == t2) return 0; =>if (TREE_UNSIGNED (TREE_TYPE (t1)) != TREE_UNSIGNED (TREE_TYPE (t2))) { int t1_sgn = tree_int_cst_sgn (t1); int t2_sgn = tree_int_cst_sgn (t2); if (t1_sgn < t2_sgn) return 1; else if (t1_sgn > t2_sgn) return 0; /* Otherwise, both are non-negative, so we compare them as unsigned just in case one of them would overflow a signed type. */ } else if (! TREE_UNSIGNED (TREE_TYPE (t1))) return INT_CST_LT (t1, t2); return INT_CST_LT_UNSIGNED (t1, t2); } At this point t2 is equal to 0, and that crashes the compiler. The following patch introduced this code without checking of non-NULL for t2: 2002-04-26 Alexandre Oliva <aoliva@redhat.com> http://gcc.gnu.org/ml/gcc-patches/2002-04/msg01549.html Alexandre, could you review this patch and the associated bug-report please? Thanks, Sebastian
next reply other threads:[~2002-09-29 8:36 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-09-29 1:36 Pop Sébastian [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-10-03 22:25 mmitchel 2002-10-03 0:05 mmitchel 2002-09-13 14:04 nathan 2002-08-28 18:36 Detlef Vollmann
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=20020929083601.10660.qmail@sources.redhat.com \ --to=pop@gauvain.u-strasbg.fr \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /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: linkBe 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).