Re: .bad_compare in bootstrap of head

2017-05-04 Thread Дмитрий Дьяченко
Fedora 26 x86_64
r247595

~/src/gcc_current/configure --prefix=/usr/local/gcc_current
--enable-static --enable-checking=no --enable-languages=c,c++,lto
--enable-plugin --disable-multilib

make[3]: Leaving directory '/home/dimhen/build/gcc_current'
Comparing stages 2 and 3
Bootstrap comparison failure!
gcc/build/genmatch.o differs
gcc/build/gentarget-def.o differs
gcc/cp/pt.o differs
gcc/c-family/c-attribs.o differs
gcc/symtab.o differs
gcc/emit-rtl.o differs
gcc/function.o differs
gcc/dwarf2out.o differs
gcc/graphite-isl-ast-to-gimple.o differs
gcc/haifa-sched.o differs
gcc/hsa-gen.o differs
gcc/ipa-devirt.o differs
gcc/ipa-inline-analysis.o differs
gcc/ipa-icf-gimple.o differs
gcc/lto-streamer-out.o differs
gcc/tree-cfg.o differs
gcc/tree-eh.o differs
gcc/tree-inline.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/tree-ssa-sccvn.o differs
gcc/tree-vectorizer.o differs

2017-05-04 16:04 GMT+03:00 Jeff Law :
> On 05/04/2017 12:59 AM, Andreas Schwab wrote:
>>
>> On Mai 03 2017, Daniel Santos  wrote:
>>
>>> Anybody else getting bootstrap failures from the head?
>>>
>>> gcc/tree-outof-ssa.o differs
>>> gcc/insn-output.o differs
>>> gcc/tree-chrec.o differs
>>> gcc/cp/semantics.o differs
>>> gcc/lto-cgraph.o differs
>>> gcc/builtins.o differs
>>> gcc/i386.o differs
>>> gcc/dwarf2out.o differs
>>
>>
>> I see a similar failure on ia64.
>
> My x86_64 builds ran fine.
>
> jeff


Re: libsanitizer merge from upstream r196489

2013-12-05 Thread Дмитрий Дьяченко
clang' build is broken for me the same way

Dmitry

2013/12/5 Tobias Burnus tobias.bur...@physik.fu-berlin.de:
 Hi,

 On Thu, Dec 05, 2013 at 02:06:52PM +0400, Konstantin Serebryany wrote:
 Another libsanitizer merge from upstream, r196489
 (Quick follow up after the r196090 merge)

 That commit breaks the build with:

 In file included from ../../../../libsanitizer/tsan/tsan_rtl_report.cc:18:0:
 ../../../../libsanitizer/tsan/tsan_rtl.h:29:44: fatal error: 
 sanitizer_common/sanitizer_asm.h: No such file or directory
  #include sanitizer_common/sanitizer_asm.h
 ^
 compilation terminated.

 Did you forgot to commit the new file?

 Tobias


Re: [PATCH i386]: Enable push/pop in pro/epilogue for modern CPUs

2012-12-09 Thread Дмитрий Дьяченко
s/Eanble/Enable/


Thanks,
Dmitry

2012/12/9 Uros Bizjak ubiz...@gmail.com:
 Hello!

 I noticed in prologue/epilogue, GCC prefers to use MOVs followed by a
 SP adjustment instead of a sequence of pushes/pops. The preference to
 the MOVs are good for old CPU micro-architectures (before pentium-4,
 K10), because it breaks the data dependency.  In modern
 micro-architecture, push/pop is implemented using a mechanism called
 stack engine. The data dependency is removed by the hardware, and
 push/pop becomes very cheap (1 uOp, 1 cycle latency), and they are
 smaller. There is no longer the need to avoid using them.   This is
 also what ICC does.

 2012-12-08  Xinliang David Li  davi...@google.com
* config/i386/i386.c: Eanble push/pop in pro/epilogue for moderen 
 CPUs.

 s/moderen/modern

 OK for mainline SVN.

 Thanks,
 Uros.


Re: [inliner] g++ -O[123] generates undefined symbol

2010-06-14 Thread Дмитрий Дьяченко
Done. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535

Thanks.
Dmitry

2010/6/14 Ian Lance Taylor i...@google.com:
 Дмитрий Дьяченко dim...@gmail.com writes:

 Trunk g++/x86/160655 with -O0 compile test w/o errors, but with
 -O[123] generates undefined symbol

 Need i file a PR?

 It certainly looks like a bug.  Please do open a bug report.  Thanks.

 Ian



[inliner] g++ -O[123] generates undefined symbol

2010-06-13 Thread Дмитрий Дьяченко
Trunk g++/x86/160655 with -O0 compile test w/o errors, but with
-O[123] generates undefined symbol

-- cat 2010_06_13.cpp
namespace FOO {

template typename T
class A
{
public:
A(char *pMemMgr = 0);
void Enum();
virtual void OnProv() = 0;
virtual ~A() { }
};
typedef Achar B;

templatetypename T
inline AT::A(char *pMemMgr)
{
}

templatetypename T
inline void AT::Enum ()
{
OnProv ();
}
} // namespace FOO

class C {};

class D: public C, public FOO::B {
public:
void OnProv() {}
};

void aaa()
{
D x;
x.Enum();
}

-- g++ -O1 -c 2010_06_13.cpp  nm -uAC 2010_06_13.o | grep OnProv
2010_06_13.o: U FOO::Achar::OnProv()

-- g++ -O0 -c 2010_06_13.cpp  nm -uAC 2010_06_13.o | grep OnProv
--

-- g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../gcc-current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-threads=posix --enable-checking=yes --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-languages=c,c++ --with-ppl
--with-cloog --with-tune=generic --with-arch=i686
--build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.6.0 20100612 (experimental) [trunk revision 160655] (GCC)


Need i file a PR?

Thanks,
Dmitry


Re: Why not contribute? (to GCC)

2010-04-24 Thread Дмитрий Дьяченко
Thank You, Manual and Joel

I'll try to choose smth appropriate to start.

I am a little confused by the term:
http://gcc.gnu.org/wiki/CompileFarm#How_to_Get_Involved.3F
3. AND at least one free software project you are a contributor of. 

I have accepted patches (well, very small and very obvious) into
llvm/clang, pcsclite. And how this may be applied to gcc-devel? I.e.,
how i may answer to Q.3? I have no patches to gcc yet.

Looks as egg -- chicken problem?

Sorry for waste Your time with trivial questions.

Thank You.
Dmitry

2010/4/23 Joel Sherrill joel.sherr...@oarcorp.com:
 On 04/23/2010 02:39 PM, Manuel López-Ibáñez wrote:

 On 23 April 2010 21:24, Дмитрий Дьяченкоdim...@gmail.com  wrote:


 I have no hardware to test patches, small free time to work and my
 english is bad.


 I always test patches in the
 CompileFarm.http://gcc.gnu.org/wiki/CompileFarm
 In fact, I only do development in the CompileFarm. I have a not very
 powerful laptop that is already overworked.
 I only use linux x86 machines but they have plenty of esoteric
 hardware and setups for testers.


 I am the maintainer of RTEMS (http://www.rtems.org).  We
 do all development cross and run all automated tests on
 simulators.  There is a wide variety of free simulators for
 the esoteric hardware and all can run on Linux x86.  We
 have scripts to help run a lot of the simulators.

 I think we have scripts to drive about 20 different simulator
 configurations.

 I don't have a good answer to the lack of time. I also have very
 little free time and the most interesting work is time-consuming.
 However, just checking whether an unconfirmed PR is still valid takes
 5 minutes. When you get proficient writing patches, the most consuming
 task of fixing a bug may be writing the Changelog. (ok ok, for some
 very very simple bugs, but they exist!).



 This is a very important task.

 Also helping ensure the PR is decent to start with is important.
 Reminding people to submit preprocessed source that
 can be used to reproduce the problem.  Getting them to try
 different optimization flags and CPU model settings.  Sometimes
 a maintainer will hone right in on the problem if you just give them
 enough details up front.

 Checking if it worked on a previous major branch.  Say broken
 in 4.4.2 but worked in 4.3.3.  Then a binary search can find it.

 Personally I don't fix any code generation problems.  But I
 try to narrow things down so that someone else can use their
 time effectively fixing it, not narrowing the problem space.

 If you read up to here your English is good enough. We do not need
 Shakespeare writing code. We need good programmers. Good patches talk
 by themselves.



 And don't be afraid when someone finds a simple mistake
 in your patch.  I get caught on this all the time.  Forgetting
 to update the copyright year, etc.

 But sometimes i submit bug reports :)


 Good! Thanks! Maybe the next step could be checking whether bug
 reports are valid or not. ;-)



 Indeed. :)

 Manuel.



 --
 Joel Sherrill, Ph.D.             Director of Research  Development
 joel.sherr...@oarcorp.com        On-Line Applications Research
 Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





Re: Why not contribute? (to GCC)

2010-04-23 Thread Дмитрий Дьяченко
I have no hardware to test patches, small free time to work and my
english is bad.
But sometimes i submit bug reports :)


2010/4/23 Manuel López-Ibáñez lopeziba...@gmail.com:
 This seems to be the question running around the blogosphere for
 several projects. And I would like to ask all people that read this
 list but hardly say or do anything.

 What reasons keep you from contributing to GCC?

 Cheers,

 Manuel.

 PS: Actually, I am not sure how many people read this list and not contribute.



[gimple] ICE verify_gimple error

2009-07-31 Thread Дмитрий Дьяченко
Hello,
current (gcc version 4.5.0 20090727 (experimental) [trunk revision
150136] (GCC))

for code

#include map

class a;
class b;

class c {
public:
b *p;
bool isNull() const { return p == 0; }
};

class d : public c {
virtual ~d() {};
};

std::mapb*, a* z;

void foo(d x) {
x.isNull();
a *y = z[x.p];
}


produce message

test.cpp: In function 'void foo(d)':
test.cpp:18:6: error: invalid operand in indirect reference
x

D.8619 = x-D.6998;

test.cpp:18:6: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

command line: g++ -c test.cpp

$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++ :
(reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++ :
(reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion
Thread model: posix
gcc version 4.5.0 20090727 (experimental) [trunk revision 150136] (GCC)


Re: [gimple] ICE verify_gimple error

2009-07-31 Thread Дмитрий Дьяченко
You are right. In rev.150316 there are no ICE.

Thanks,
Dmitry


2009/7/31 Richard Guenther richard.guent...@gmail.com:
 On Fri, Jul 31, 2009 at 9:53 AM, Дмитрий Дьяченкоdim...@gmail.com wrote:
 Hello,
 current (gcc version 4.5.0 20090727 (experimental) [trunk revision
 150136] (GCC))

 for code
 
 #include map

 class a;
 class b;

 class c {
 public:
    b *p;
    bool isNull() const { return p == 0; }
 };

 class d : public c {
    virtual ~d() {};
 };

 std::mapb*, a* z;

 void foo(d x) {
    x.isNull();
    a *y = z[x.p];
 }
 

 produce message

 test.cpp: In function 'void foo(d)':
 test.cpp:18:6: error: invalid operand in indirect reference
 x

 D.8619 = x-D.6998;

 test.cpp:18:6: internal compiler error: verify_gimple failed
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See http://gcc.gnu.org/bugs.html for instructions.

 Please file a bugreport about this after verifying that rev. 150222
 does not fix this (which I think it does).

 Thanks,
 Richard.

 command line: g++ -c test.cpp

 $ gcc -v
 Using built-in specs.
 Target: i686-pc-linux-gnu
 Configured with: ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++ :
 (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++ :
 (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion : (reconfigured) ../gcc_current/configure
 --prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
 --enable-checking=yes --with-system-zlib --enable-__cxa_atexit
 --enable-version-specific-runtime-libs --enable-languages=c,c++
 --no-create --no-recursion
 Thread model: posix
 gcc version 4.5.0 20090727 (experimental) [trunk revision 150136] (GCC)




invalid may be used uninitialized warning with g++ current

2009-02-04 Thread Дмитрий Дьяченко
The following code

int bar(int *global)
{
int local;
if(local != global)
return 0;
return local;
}

compiled with gcc/x86/Linux version 4.4.0 20090204 (experimental)
[trunk revision 143938]
trigger warning:

# g++ -Wall -O2 -c test4.cpp
test4.cpp: In function 'int bar(int*)':
test4.cpp:6: warning: 'local' may be used uninitialized in this function

gcc-3.4.6/FreeBSD/x86 and gcc-4.1.2/FedoraCore8/x86 does not warning.

I was tried to find anything similar in bugzilla (including #24639), but fail.

I miss something or I need to file bug report?

Dmitry


Re: invalid may be used uninitialized warning with g++ current

2009-02-04 Thread Дмитрий Дьяченко
Thanks,

Sorry, but I don't understood  - is it impossible to fix, so there are
no needs in bug report?
Or PR about this issue already exists?
Or it's not a bug?

Dmitry


2009/2/5 Andrew Pinski pins...@gmail.com:
 On Wed, Feb 4, 2009 at 1:18 PM, Дмитрий Дьяченко dim...@gmail.com wrote:
 The following code

 int bar(int *global)
 {
int local;
if(local != global)
return 0;
return local;
 }

 The issue is that GCC does not figure that global cannot point to
 local so it does not optimize away the if statement.

 Thanks,
 Andrew Pinski



[strict-aliasing] incorrect warning with g++-current in STL

2009-01-30 Thread Дмитрий Дьяченко
Hello, g++-current ( [trunk revision 143790] ) produce incorrect
warning. Need I file bug-report?

# g++ -Wall -O2 -c test3.cpp
test3.cpp: In function 'void bar()':
test3.cpp:16: warning: dereferencing pointer 'anonymous' does break
strict-aliasing rules
/usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_list.h:139:
note: initialized from here

# pr -n test3.cpp
1   #include string
2   #include list
3
4   class A;
5
6   class B {
7   public:
8   void foo(A);
9   std::string s;
   10   };
   11
   12   class A {
   13   public:
   14   A qaz() {
   15   l.push_back( new A() );
   16   return *l.back();
   17   }
   18   std::listA* l;
   19   };
   20
   21   void bar()
   22   {
   23   A a;
   24   B b;
   25   b.foo(a.qaz());
   26   }

[r...@localhost gcc_err]# g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++ :
(reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure

[strict-aliasing] warning message contains compiler-generated symbols

2008-12-10 Thread Дмитрий Дьяченко
g++-current generates messages which
1) contains compiler generated symbols
2) refers to gcc internal header (stl_tree.h)

[EMAIL PROTECTED] gcc_err]# g++ -Wall -c -O3 test.cpp
test.cpp: In member function 'void
test::bar(std::_List_iteratorKeyPairPtrint, int )':
test.cpp:14: warning: dereferencing pointer '__x.13' does break
strict-aliasing rules
/usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
note: initialized from here
test.cpp:14: warning: dereferencing pointer '__x.13' does break
strict-aliasing rules
/usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
note: initialized from here

[EMAIL PROTECTED] gcc_err]# g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++ :
(reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion : (reconfigured) ../gcc_current/configure
--prefix=/usr/local/gcc_current --enable-shared --enable-threads=posix
--enable-checking=release --enable-__cxa_atexit
--enable-version-specific-runtime-libs --enable-languages=c,c++
--no-create --no-recursion
Thread model: posix
gcc version 4.4.0 20081210 (experimental) [trunk revision 142645] (GCC)

[EMAIL PROTECTED] gcc_err]# uname -a
Linux localhost.localdomain 2.6.26.6-49.fc8 #1 SMP Fri Oct 17 15:59:36
EDT 2008 i686 i686 i386 GNU/Linux

[EMAIL PROTECTED] gcc_err]# cat test.cpp
#include set
#include list

templateclass Key, class Info
class KeyPairPtr
{
public:
typedef typename std::pair const Key, Info  Pair;
Pair *pair_ptr;
};

templateclass Key, class Info
bool operator ( const KeyPairPtrKey, Info left, const
KeyPairPtrKey, Info right ) {
return left.pair_ptr  right.pair_ptr;
}

typedef KeyPairPtrint,int key_val;

class test
{
test();
void bar( std::listkey_val::iterator ci );

std::setkey_val foo;
};

void test::bar( std::listkey_val::iterator ci )
{
test ctx;
ctx.foo.insert( *ci );
}


Re: [strict-aliasing] warning message contains compiler-generated symbols

2008-12-10 Thread Дмитрий Дьяченко
done PR #38477.

I only was trying accuratly report. The message was readable but looks unusual.

Dmitry

2008/12/10 Richard Guenther [EMAIL PROTECTED]:
 On Wed, Dec 10, 2008 at 5:44 PM, Дмитрий Дьяченко [EMAIL PROTECTED] wrote:
 g++-current generates messages which
 1) contains compiler generated symbols
 2) refers to gcc internal header (stl_tree.h)

 [EMAIL PROTECTED] gcc_err]# g++ -Wall -c -O3 test.cpp
 test.cpp: In member function 'void
 test::bar(std::_List_iteratorKeyPairPtrint, int )':
 test.cpp:14: warning: dereferencing pointer '__x.13' does break
 strict-aliasing rules
 /usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
 note: initialized from here
 test.cpp:14: warning: dereferencing pointer '__x.13' does break
 strict-aliasing rules
 /usr/local/gcc_current/lib/gcc/i686-pc-linux-gnu/4.4.0/include/c++/bits/stl_tree.h:530:
 note: initialized from here

 First of all, please file a bugreport about this.  Second - wrt 1) -
 what would you like
 to see?  Sth like 'dereferencing pointer expression does break ...'?
 (we cannot reliably
 re-construct the original source expression here).  For 2), the system
 header mechanism
 should have fixed it unless, of course, the whole thing is inlined
 (and maybe inform ()
 isn't aware of system-headers either).  But I think it is useful to
 know where it comes
 from rather than just seeing the warning.

 Richard.