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

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
Many NDD patterns have the same issue.  Here is another testcase:

[hjl@gnu-cfl-3 pr113711]$ cat apx-ndd-length-X.c
/* { dg-do assemble { target { apxf && { ! ia32 } } } } */
/* { dg-options "-mapxf -O2" } */

typedef signed __int128 S;
int o;

S
qux (void)
{
  S z;
  o = __builtin_add_overflow (*(S __seg_fs *) 0x1000, 0x200, &z);
  return z;
}
[hjl@gnu-cfl-3 pr113711]$ make apx-ndd-length-X.o
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -mapxf
-O3 -dp   -c -o apx-ndd-length-X.o apx-ndd-length-X.c
/tmp/cc1eMHh5.s: Assembler messages:
/tmp/cc1eMHh5.s:9: Warning: instruction length of 16 bytes exceeds the limit of
15
[hjl@gnu-cfl-3 pr113711]$ cat apx-ndd-length-Y.c 
/* { dg-do assemble { target { apxf && { ! ia32 } } } } */
/* { dg-options "-mapxf -O2" } */

__thread signed __int128 var;
int o;

signed __int128
qux (void)
{
  signed __int128 z;
  o = __builtin_add_overflow (var, 0x200, &z);
  return z;
}
[hjl@gnu-cfl-3 pr113711]$ make apx-ndd-length-Y.o
/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-gitlab-debug/build-x86_64-linux/gcc/ -mapxf
-O3 -dp   -c -o apx-ndd-length-Y.o apx-ndd-length-Y.c
/tmp/ccwvDbZA.s: Assembler messages:
/tmp/ccwvDbZA.s:9: Warning: instruction length of 16 bytes exceeds the limit of
15
[hjl@gnu-cfl-3 pr113711]$ 

We need to exam all NDD patterns to check invalid memory constraint.
We should find a testcase for each issue we find.

Reply via email to