Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-55492

[autotest] tst_collections.cpp in align test doesn't take arm limitations into account

    XMLWordPrintable

Details

    • bbb67ca32cebad312f02e916dff54e591b92af24

    Description

      In Qt/5.7/Src/qtbase/tests/auto/corelib/tools/collections/tst_collections.cpp doesn't take into account that Q_ALIGNOF limit is BIGGEST_ALIGNMENT with GCC and building fails at:

      Q_STATIC_ASSERT(Q_ALIGNOF(Aligned128) % 128 == 0);
      

      with:

      compiling ../collections/tst_collections.cpp
      ../collections/tst_collections.cpp:3211:25: warning: requested alignment 128 is larger than 64 [-Wattributes]
       class Q_DECL_ALIGN(128) Aligned128
                               ^
      In file included from /home/kapinter/Qt/5.7/Boot2Qt/nitrogen6x/toolchain/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore/qcontainerfwd.h:43:0,
                       from /home/kapinter/Qt/5.7/Boot2Qt/nitrogen6x/toolchain/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore/QtContainerFwd:1,
                       from ../collections/tst_collections.cpp:31:
      /home/kapinter/Qt/5.7/Boot2Qt/nitrogen6x/toolchain/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtCore/qglobal.h:745:36: error: static assertion failed: Q_ALIGNOF(Aligned128) % 128 == 0
       #define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition)
                                          ^
      ../collections/tst_collections.cpp:3223:1: note: in expansion of macro 'Q_STATIC_ASSERT'
       Q_STATIC_ASSERT(Q_ALIGNOF(Aligned128) % 128 == 0);
       ^
      

      commit qtbase:0f559a2d998d7ff5b7dec83a1c7e8a9996cbaa26 has enabled this extension and gcc has BIGGEST_ALIGNMENT limitation for it.

      https://gcc.gnu.org/onlinedocs/gccint/Storage-Layout.html
      https://github.com/gcc-mirror/gcc/blob/master/gcc/config/arm/arm.h

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sanurmen Sami Nurmenniemi
            karimpinter Karim Pinter (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes