From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5804 invoked by alias); 25 Jul 2010 23:23:47 -0000 Received: (qmail 5776 invoked by uid 48); 25 Jul 2010 23:23:36 -0000 Date: Sun, 25 Jul 2010 23:23:00 -0000 Subject: [Bug c++/45070] New: Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "siarhei dot siamashka at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg02806.txt.bz2 Compilation: arm-unknown-linux-gnueabi-g++ -Os -mcpu=cortex-a8 -o test test.cpp Expected results: ./test 65534 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Real results (some garbage data): ./test 544 544 544 544 544 544 544 544 544 544 544 544 544 544 544 544 Note: This is not a big practical issue because Qt 4.7 does not use packed attribute for QChar anymore (a good idea because using this packed attribute results in a horribly slow code): http://qt.gitorious.org/qt/qt/commit/1ec8acd77b6c048f5a68887ac7750b0764ade598 -- Summary: Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: siarhei dot siamashka at gmail dot com GCC target triplet: arm-unknown-linux-gnueabi http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070