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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content