Jakub Jelinek 35476a0da6 stmt: Fix up parse_input_constraint [PR111817]
The following invalid testcase ICEs, because we:
1) for some strange reason ignore invalid punctuations in
   parse_output_constraint, which has just
        default:
          if (!ISALPHA (*p))
            break;
   compared to parse_input_constraint
      default:
        if (! ISALPHA (constraint[j]))
          {
            error ("invalid punctuation %qc in constraint", constraint[j]);
            return false;
          }
   Haven't touched this because I fear it could break real-world code
2) the checking whether = or + is first in the output constraint is
   a warning only:
      if (p != constraint)
        warning (0, "output constraint %qc for operand %d "
                 "is not at the beginning",
                 *p, operand_num);
3) parse_input_constraint parses also the corresponding output constraint
   if the input constraint has a number as the only variant, but
   even the comment removed in the following patch explains that it
   doesn't work correctly and skips the first character; now, usually
   that is not a big deal because if the first character of the output
   constraint is = or + as it should, then the checking doesn't do anything;
   but as 2) is just a warning, we accept it and then we fail to check it
4) far later on we parse the whole output constraint when input constraint
   refers to it and assert it succeeds, which it doesn't due to 1), 2) and 3)

The following patch fixes the 3) spot, when switching to the output
constraint, instead of setting j = 0; and break; (== continue;) so that it
first does j += CONSTRAINT_LEN (constraint[0], constraint+0) and thus
usually starts at second, sometimes third character of the output constraint
it uses goto before the loop which sets j = 0; and doesn't do the j += ...

2026-01-08  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/111817
	* stmt.cc (parse_input_constraint): For matching construct, goto
	before the loop without changing j instead of break.  Remove comment
	about that problem.

	* c-c++-common/pr111817.c: New test.
2026-01-08 23:05:58 +01:00
2026-01-02 09:56:11 +01:00
2025-12-31 00:16:24 +00:00
2026-01-08 00:16:32 +00:00
2026-01-08 14:17:30 -03:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 09:56:11 +01:00
2026-01-06 00:16:27 +00:00
2026-01-02 09:56:11 +01:00
2025-12-30 00:16:33 +00:00
2026-01-03 00:16:36 +00:00
2026-01-08 00:16:32 +00:00
2025-12-30 00:16:33 +00:00
2026-01-07 00:16:25 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 10:47:06 +01:00
2026-01-02 00:16:23 +00:00
2025-12-30 00:16:33 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-12-22 00:16:25 +00:00
2025-12-30 00:16:33 +00:00
2026-01-07 00:16:25 +00:00
2025-11-30 01:52:24 +01:00
2025-10-11 11:08:01 +02:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 1.5 GiB
Languages
C++ 30.7%
C 30%
Ada 14.5%
D 6.1%
Go 5.7%
Other 12.5%