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: Xiao-Yong Jin
Subject: Re: [Bug-apl] svn r849 fails to compile with gcc 6.2 -O3
Date: Mon, 16 Jan 2017 22:10:48 -0600

In addition, there is one more warning/error.

g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wall -I sql -I/sandbox/pkg/lib/include 
-I/sandbox/pkg/include  -rdynamic -Wno-maybe-uninitialized -march=native -O3 
-pipe -I/sandbox/pkg/include -MT apl-SymbolTable.o -MD -MP -MF 
.deps/apl-SymbolTable.Tpo -c -o apl-SymbolTable.o `test -f 'SymbolTable.cc' || 
echo './'`SymbolTable.cc
SymbolTable.cc: In member function ‘void SystemSymTab::clear(std::ostream&)’:
SymbolTable.cc:499:37: error: iteration 255 invokes undefined behavior 
[-Werror=aggressive-loop-optimizations]
 SystemName * sym = symbol_table[hash];
                                     ^
In file included from Assert.hh:24:0,
                 from Simple_string.hh:33,
                 from CDR_string.hh:24,
                 from CDR.hh:24,
                 from SymbolTable.cc:24:
Common.hh:106:44: note: within this loop
 #define loop(v, e) for (ShapeItem v = 0; v < ShapeItem(e); ++v)

SymbolTable.cc:493:4: note: in expansion of macro ‘loop’
    loop(hash, SYMBOL_HASH_TABLE_SIZE)   clear_slot(out, hash);
    ^~~~
cc1plus: all warnings being treated as errors

> On Jan 16, 2017, at 8:05 PM, Xiao-Yong Jin <address@hidden> 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]