public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/37710] When peeling an ordinary label off a case-table and making it a default label, strip from the end with identical labels.
Date: Sun, 29 Aug 2021 03:26:32 +0000	[thread overview]
Message-ID: <bug-37710-4-BkeyBllCvu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-37710-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37710

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a new testcase:
extern void abort (void);

extern char *name1;
extern char *name2;

int stab_xcoff_builtin_type (int typenum) __attribute__((noclone,noinline));
int stab_xcoff_builtin_type (int typenum)
{
  const char *name;
  if (typenum >= 0 || typenum < -34)
    {
      return 0;
    }
  switch (-typenum)
    {
    case 1:
      name = name1;"int";
      break;
    case 2:
      name = "char";
    case 3:
      name = name2;"short";
      break;
    case 4:
      name = "long";
      break;
    case 5:
      name = "unsigned char";
      break;
    case 6:
      name = "signed char";
      break;
    case 7:
      name = "unsigned short";
      break;
    case 8:
      name = "unsigned int";
      break;
    case 9:
      name = "unsigned";
      break;
    case 10:
      name = "unsigned long";
      break;
    case 11:
      name = "void";
      break;
    case 12:
      name = "float";
      break;
    case 13:
      name = "double";
      break;
    case 14:
      name = "long double";
      break;
    case 15:
      name = "integer";
      break;
    case 16:
      name = "boolean";
      break;
    case 17:
      name = "short real";
      break;
    case 18:
      name = "real";
      break;
    case 19:
      name = "stringptr";
      break;
    case 20:
      name = "character";
      break;
    case 21:
      name = "logical*1";
      break;
    case 22:
      name = "logical*2";
      break;
    case 23:
      name = "logical*4";
      break;
    case 24:
      name = "logical";
      break;
    case 25:
      name = "complex";
      break;
    case 26:
      name = "double complex";
      break;
    case 27:
      name = "integer*1";
      break;
    case 28:
      name = "integer*2";
      break;
    case 29:
      name = "integer*4";
      break;
    case 30:
      name = "wchar";
    case 31:
      name = "long long";
      break;
    case 32:
      name = "unsigned long long";
      break;
    case 33:
      name = "logical*8";
      break;
    case 34:
      name = "integer*8";
      break;
    }
  return name[0];
}

int main()
{
  int i;
  if (stab_xcoff_builtin_type(0) != 0)
    abort ();
  if (stab_xcoff_builtin_type(-1) != 'i')
    abort ();
  if (stab_xcoff_builtin_type(-2) != 's')
    abort ();
  if (stab_xcoff_builtin_type(-3) != 's')
    abort ();
  for (i = -4; i >= -34; --i)
    if (stab_xcoff_builtin_type(i) != 'i')
      abort ();
  if (stab_xcoff_builtin_type(-35) != 0)
    abort ();
  return 0;
}

  parent reply	other threads:[~2021-08-29  3:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-37710-4@http.gcc.gnu.org/bugzilla/>
2021-08-29  2:47 ` pinskia at gcc dot gnu.org
2021-08-29  3:26 ` pinskia at gcc dot gnu.org [this message]
2021-08-29  3:30 ` pinskia at gcc dot gnu.org
2008-10-02  0:31 [Bug middle-end/37710] New: " hp at gcc dot gnu dot org
2008-10-02 11:09 ` [Bug middle-end/37710] " rguenth 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=bug-37710-4-BkeyBllCvu@http.gcc.gnu.org/bugzilla/ \
    --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).