Bug 1463739 - GCC 7, aligned_storage and “dereferencing type-punned pointer will break strict-aliasing rules”
GCC 7, aligned_storage and “dereferencing type-punned pointer will break stri...
Status: CLOSED DUPLICATE of bug 1448666
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
26
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-21 11:35 EDT by Jeff Layton
Modified: 2017-06-21 19:27 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-21 19:27:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 80593 None None None 2017-06-21 11:35 EDT

  None (edit)
Description Jeff Layton 2017-06-21 11:35:49 EDT
I was trying to build ceph on my f26 host. It has an embedded copy of rocksdb, which g++-7 seems to be unable to build:

[ 11%] Building ASM object src/erasure-code/isa/CMakeFiles/cephd_ec_isa.dir/__/__/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.o
In file included from /home/jlayton/git/ceph/src/rocksdb/db/write_batch_internal.h:12:0,
                 from /home/jlayton/git/ceph/src/rocksdb/db/column_family.h:20,
                 from /home/jlayton/git/ceph/src/rocksdb/db/version_set.h:31,
                 from /home/jlayton/git/ceph/src/rocksdb/db/compaction.h:11,
                 from /home/jlayton/git/ceph/src/rocksdb/db/compaction_iterator.h:14,
                 from /home/jlayton/git/ceph/src/rocksdb/db/builder.cc:16:
/home/jlayton/git/ceph/src/rocksdb/db/write_thread.h: In member function ‘std::mutex& rocksdb::WriteThread::Writer::StateMutex()’:
/home/jlayton/git/ceph/src/rocksdb/db/write_thread.h:192:78: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
       return *static_cast<std::mutex*>(static_cast<void*>(&state_mutex_bytes));
                                                                              ^
cc1plus: all warnings being treated as errors
make[6]: *** [CMakeFiles/rocksdb.dir/build.make:135: CMakeFiles/rocksdb.dir/db/builder.cc.o] Error 1
make[5]: *** [CMakeFiles/Makefile2:2225: CMakeFiles/rocksdb.dir/all] Error 2
make[4]: *** [CMakeFiles/Makefile2:2237: CMakeFiles/rocksdb.dir/rule] Error 2
make[3]: *** [Makefile:877: rocksdb] Error 2
make[2]: *** [src/CMakeFiles/rocksdb_ext.dir/build.make:113: src/rocksdb_ext-prefix/src/rocksdb_ext-stamp/rocksdb_ext-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1715: src/CMakeFiles/rocksdb_ext.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....


...some digging around turned up this gcc bug report:

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

...which seems to indicate that this is a regression in gcc7. Can we get the patch merged into gcc for f26 for this?
Comment 1 Jeff Layton 2017-06-21 19:27:51 EDT

*** This bug has been marked as a duplicate of bug 1448666 ***

Note You need to log in before you can comment on or make changes to this bug.