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

Bug#328939: g++-4.0: this bug still exist in gcc-snapshot



Package: g++-4.0
Version: 4.0.1-7
Followup-For: Bug #328939

This bug can reproduce under gcc-snapshot. should I clone it to
gcc-snapshot?

gcc-snapshot is somehow better, it remove the unused symbol.

$ cat const.cpp
//const.cpp

extern const double minute;

const double second = 1.0;
const double minute = 60.0 * second;
$ g++-3.4 -c -O3 const.cpp && nm const.o | c++filt 
00000000 R minute
$ g++-4.0 -c -O3 const.cpp && nm const.o | c++filt
00000030 t global constructors keyed to minute
00000000 B minute
00000000 r second
00000000 t __static_initialization_and_destruction_0(int, int)
$ /usr/lib/gcc-snapshot/bin/g++ -c -O3 const.cpp && nm const.o | c++filt
00000030 t global constructors keyed to minute
00000000 B minute
00000000 t __static_initialization_and_destruction_0(int, int)


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686-smp
Locale: LANG=en_US.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)

Versions of packages g++-4.0 depends on:
ii  gcc-4.0                       4.0.1-7    The GNU C compiler
ii  gcc-4.0-base                  4.0.1-7    The GNU Compiler Collection (base 
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  libstdc++6-4.0-dev            4.0.1-7    The GNU Standard C++ Library v3 (d

g++-4.0 recommends no packages.

-- no debconf information



Reply to: