C++ program miscompiled by GCC with O2 Optimization level in Red Hat Enterprise Linux 6.4

Solution Unverified - Updated -

Issue

  • Red Hat shipped versions of gcc-c++ with O2 Optimization level miscompiles the program.
  • This works as expected in Clang 3.3 and gcc 4.8 from other distributions.

Environment

  • Red Hat Enterprise Linux 6.4
  • boost-devel-1.41.0-17.el6_4.x86_64
  • gcc-c++-4.4.7-3.el6.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.