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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2025-05-24
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
[hjl@gnu-zen4-1 pr117839]$ cat dl-2.c 
struct __pthread_mutex_s
{
  int __lock;
  unsigned int __count;
  int __owner;
  unsigned int __nusers;
  int __kind;
  short __spins;
  short __elision;
  void *p[2];
};
typedef union
{
  struct __pthread_mutex_s __data;
  char __size[40];
  long int __align;
} pthread_mutex_t;
typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t;
void
foo (__rtld_lock_recursive_t *lock, int i)
{
  lock[i] = (__rtld_lock_recursive_t) {{ { 0, 0, 0, 0, 1,
      0, 0, { ((void *)0) , ((void *)0) } } }};
}
[hjl@gnu-zen4-1 pr117839]$ make dl-2.s
/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/ -O2 -fPIC
-mtune=sapphirerapids -S dl-2.c
[hjl@gnu-zen4-1 pr117839]$ cat dl-2.s
        .file   "dl-2.c"
        .text
        .p2align 4
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        movslq  %esi, %rsi
        pxor    %xmm0, %xmm0
        leaq    (%rsi,%rsi,4), %rax
        movq    $1, 16(%rdi,%rax,8)
        andq    $0, (%rdi,%rax,8)
        andq    $0, 8(%rdi,%rax,8)
        movups  %xmm0, 24(%rdi,%rax,8)
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 16.0.0 20250524 (experimental)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-zen4-1 pr117839]$

Reply via email to