]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/uuid/test/test_msvc_simd_bug981648_foo.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / uuid / test / test_msvc_simd_bug981648_foo.cpp
CommitLineData
7c673cae
FG
1/*
2* Copyright 2014 Andrey Semashev
3*
4* Distributed under the Boost Software License, Version 1.0.
5* See accompanying file LICENSE_1_0.txt or copy at
6* http://www.boost.org/LICENSE_1_0.txt
7*/
8/*
9* This is a part of the test for a workaround for MSVC 12 (VS2013) optimizer bug
10* which causes incorrect SIMD code generation for operator==. See:
11*
12* https://svn.boost.org/trac/boost/ticket/8509#comment:3
13* https://connect.microsoft.com/VisualStudio/feedbackdetail/view/981648#tabs
14*
15* The file contains the function that actually causes the crash. Reproduces only
16* in Release x64 builds.
17*/
18#include <cstdio>
19#include "test_msvc_simd_bug981648.hpp"
20void mp_grid_update_marker_parameters(headerProperty* header_prop, my_obj &current_marker)
21{
22headerProperty *old_header_prop = NULL;
23my_obj *p = dynamic_cast<my_obj*>(header_prop);
24/*
25* This != statement crashes with a GP.
26* */
27if (p != NULL && (current_marker.get_id() != p->get_marker_id())) {
b32b8144 28std::printf("works okay, if it reaches this printf: %p\n", reinterpret_cast<void *>(p));
7c673cae 29old_header_prop = header_prop;
b32b8144 30if (old_header_prop == 0) { fprintf(stderr, "ouch"); }
7c673cae
FG
31}
32}