bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] svn r849 fails to compile with gcc 6.2 -O3


From: Juergen Sauermann
Subject: Re: [Bug-apl] svn r849 fails to compile with gcc 6.2 -O3
Date: Wed, 18 Jan 2017 16:19:24 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Xiao-Yong,

I suppose this warning is bogus as well. However, I have changed the default Shape constructor
so that even unused elements of rho[] are initialized to 0. SVN 853.

/// Jürgen


On 01/17/2017 03:05 AM, Xiao-Yong Jin wrote:
Not sure if it's another gcc unrolling bug.
Using gcc 6.2.0

g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wall -I sql -I/sandbox/pkg/lib/include -I/sandbox/pkg/include  -rdynamic -march=native -O3 -pipe -I/sandbox/pkg/include -MT apl-Bif_F12_SORT.o -MD -MP -MF .deps/ap
l-Bif_F12_SORT.Tpo -c -o apl-Bif_F12_SORT.o `test -f 'Bif_F12_SORT.cc' || echo './'`Bif_F12_SORT.cc
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh: In constructor ‘CollatingCache::CollatingCache(const Value&, const Cell*, ShapeItem)’:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[7]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[7]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[6]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[6]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[5]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[5]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[4]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[4]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[3]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[3]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[2]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[2]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
In file included from PrintBuffer.hh:28:0,
                 from Cell.hh:27,
                 from Value.hh:30,
                 from Value.icc:24,
                 from NamedObject.hh:25,
                 from Function.hh:27,
                 from PrimitiveFunction.hh:25,
                 from Bif_F12_SORT.hh:25,
                 from Bif_F12_SORT.cc:22:
Shape.hh:143:43: error: ‘*((void*)(& entry)+8).Shape::rho[1]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         rho[rho_rho++] = len;   volume *= len; }
                                           ^~~
Bif_F12_SORT.cc:56:36: note: ‘*((void*)(& entry)+8).Shape::rho[1]’ was declared here
          const CollatingCacheEntry entry(uni, A.get_shape());
                                    ^~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [apl-Bif_F12_SORT.o] Error 1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]