Nathan,

imho, this is a compiler bug and only two versions are affected :
- intel icc 14.0.0.080 (aka 2013sp1)
- intel icc 14.0.1.106 (aka 2013sp1u1)
/* note the bug only occurs with -O1 and higher optimization levels */

here is attached a simple reproducer

a simple workaround is to configure with ac_cv_type___int128=0

Cheers,

Gilles

On 2015/02/04 4:17, Nathan Hjelm wrote:
> Thats the second report involving icc 14. I will dig into this later
> this week.
>
> -Nathan
>
> On Mon, Feb 02, 2015 at 11:03:41PM -0800, Paul Hargrove wrote:
>>    I have seen opal_fifo hang on 2 distinct systems
>>     + Linux/ppc32 with xlc-11.1
>>     + Linux/x86-64 with icc-14.0.1.106
>>    I have no explanation to offer for either hang.
>>    No "weird" configure options were passed to either.
>>    -Paul
>>    --
>>    Paul H. Hargrove                          phhargr...@lbl.gov
>>    Computer Languages & Systems Software (CLaSS) Group
>>    Computer Science Department               Tel: +1-510-495-2352
>>    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
>> _______________________________________________
>> devel mailing list
>> de...@open-mpi.org
>> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> Link to this post: 
>> http://www.open-mpi.org/community/lists/devel/2015/02/16911.php
>
>
> _______________________________________________
> devel mailing list
> de...@open-mpi.org
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post: 
> http://www.open-mpi.org/community/lists/devel/2015/02/16920.php

/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
#include <stdint.h>
#include <assert.h>

union opal_counted_pointer_t {
    struct {
        uint64_t counter;
        uint64_t item;
    } data;
    __int128_t value;
};
typedef union opal_counted_pointer_t opal_counted_pointer_t;

int main (int argc, char *argv[]) {
    volatile opal_counted_pointer_t a;
    opal_counted_pointer_t b;

    a.data.counter = 0;
    a.data.item = 0x1234567890ABCDEF;

    b.data.counter = a.data.counter;
    b.data.item = a.data.item;

    /* bozo checks */
    assert(16 == sizeof(opal_counted_pointer_t));
    assert(a.data.counter == b.data.counter);
    assert(a.data.item == b.data.item);
    /* 
     * following assert fails on buggy compilers
     * so far, with icc -o conftest conftest.c 
     *  - intel icc 14.0.0.080 (aka 2013sp1)
     *  - intel icc 14.0.1.106 (aka 2013sp1u1)
     * older and more recents compilers work fine
     * buggy compilers work also fine but only with -O0
     */
    assert(a.value == b.value);
    return 0;
}

Reply via email to