public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nick at sqrt dot co dot uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/21958] New: verify_stmts reports tree node sharing assertion
Date: Wed, 08 Jun 2005 11:54:00 -0000	[thread overview]
Message-ID: <20050608115434.21958.nick@sqrt.co.uk> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

Using GCC 4.1 mainline checkout at 20050607.

$ ./i686-linux/gcc/xgcc -B ./i686-linux/gcc -S bug1.c -O1
bug1.c: In function ‘foo’:
bug1.c:2: error: Incorrect sharing of tree nodes
D.1290_47 = (charD.1 * *) pD.1236_3;

(charD.1 * *) pD.1236_3;

bug1.c:2: internal compiler error: verify_stmts failed.
Please submit a full bug report,


I've narrowed down a testcase to:

void foo (char *p)
{
  char *endptr = p;
  while (1)
    {
      int i = 1;
      char **members;

      if (p[1])
	{
	  do {
	    if (*p == ',')
	      {
		i++;
		*p = 0;
	      }
	  } while (*++p);
	}

      members = (char **) p;
      if (--i)
	{
	  p = endptr;
	  do {
	    *members++ = ++p;
	    if (!--i)
	      break;
	    while (*++p) {}
	  } while (1);
	}
      *members = 0;
    }
}

-- 
           Summary: verify_stmts reports tree node sharing assertion
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nick at sqrt dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21958


             reply	other threads:[~2005-06-08 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 11:54 nick at sqrt dot co dot uk [this message]
2005-06-08 12:54 ` [Bug tree-optimization/21958] [4.1 Regression] " pinskia at gcc dot gnu dot org

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=20050608115434.21958.nick@sqrt.co.uk \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).