summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/pr54845.cpp
blob: acf2c3121900b3043abc0cf0bcf14afdf2a099e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cc1 -triple i686-linux-gnu -emit-llvm %s -o - | FileCheck %s
// https://github.com/llvm/llvm-project/issues/54845

void *operator new(unsigned int, void *);

void test(double *d) {
  // This store used to have an alignment of 8, which was incorrect as
  // the i386 psABI only guarantees a 4-byte alignment for doubles.

  // CHECK: store double 0.000000e+00, {{.*}}, align 4
  new (d) double(0);
}