[PR99680] Check empty constraint before using CONSTRAINT_LEN.
authorVladimir N. Makarov <vmakarov@redhat.com>
Sat, 20 Mar 2021 14:50:03 +0000 (10:50 -0400)
committerVladimir N. Makarov <vmakarov@redhat.com>
Sat, 20 Mar 2021 14:52:10 +0000 (10:52 -0400)
commit8bf983c71e42d5a9f9df8a7dc436b30cd9da42f5
treec3dde12b6a05c46a655d9f65255277edf0049b78
parent5f256a70a05fcfc5a1caf56678ceb12b4f87f781
[PR99680] Check empty constraint before using CONSTRAINT_LEN.

It seems CONSTRAINT_LEN treats constraint '\0' as one having length 1.  Therefore we
read after the constraint string.  The patch fixes it.

gcc/ChangeLog:

PR rtl-optimization/99680
* lra-constraints.c (skip_contraint_modifiers): Rename to skip_constraint_modifiers.
(process_address_1): Check empty constraint before using
CONSTRAINT_LEN.
gcc/lra-constraints.c