Bug 228769 - spurious recompiling with -frepo and anonymous namespace
Summary: spurious recompiling with -frepo and anonymous namespace
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-14 21:09 UTC by Serge Pavlovsky
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-03-13 13:53:33 UTC


Attachments (Terms of Use)

Description Serge Pavlovsky 2007-02-14 21:09:32 UTC
Description of problem:


Version-Release number of selected component (if applicable):
4.1.1-51.fc6

How reproducible:
[pal@underdark repo]$ cat a.cpp
#include <vector>
namespace {
class A { };
}
int main ( ) {
        std :: vector < A > v;
        v.begin ( );
}
Steps to Reproduce:
1.
[pal@underdark repo]$ /usr/bin/g++ -c a.cpp -frepo -D_GLIBCXX_DEBUG && LC_ALL=C
/usr/bin/g++ a.o -o a
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
2.
[pal@underdark repo]$ cp a.rpo b.rpo
[pal@underdark repo]$ /usr/bin/g++ -c a.cpp -frepo -D_GLIBCXX_DEBUG && LC_ALL=C
/usr/bin/g++ a.o -o a
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
collect: recompiling a.cpp
collect: relinking
3.
[pal@underdark repo]$ diff -u b.rpo a.rpo
--- b.rpo       2007-02-14 23:03:22.000000000 +0200
+++ a.rpo       2007-02-14 23:03:30.000000000 +0200
@@ -1,16 +1,16 @@
 M a.cpp
 D /home/pal/tmp/repo
-A '-c' '-frepo' '-D_GLIBCXX_DEBUG' '-mtune=generic' '-frandom-seed=0xc210c8d9'
-C _ZTSN10__gnu_norm12_Vector_baseIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
-C _ZTIN10__gnu_norm12_Vector_baseIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
-C _ZTSN10__gnu_norm6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
-C _ZTIN10__gnu_norm6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
-C
_ZTSN11__gnu_debug14_Safe_sequenceIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS4_EEEEE
-C
_ZTIN11__gnu_debug14_Safe_sequenceIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS4_EEEEE
-C
_ZTSN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPN34_GLOBAL__N_a.cpp_00000000_982312C41AEN10__gnu_norm6vectorIS4_SaIS4_EEEEEN15__gnu_debug_def6vectorIS4_S8_EEEE
-C
_ZTIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPN34_GLOBAL__N_a.cpp_00000000_982312C41AEN10__gnu_norm6vectorIS4_SaIS4_EEEEEN15__gnu_debug_def6vectorIS4_S8_EEEE
-C _ZTSN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
-C _ZTIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_982312C41AESaIS2_EEE
+A '-c' '-frepo' '-D_GLIBCXX_DEBUG' '-mtune=generic' '-frandom-seed=0xc2110a5c'
+C _ZTSN10__gnu_norm12_Vector_baseIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
+C _ZTIN10__gnu_norm12_Vector_baseIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
+C _ZTSN10__gnu_norm6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
+C _ZTIN10__gnu_norm6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
+C
_ZTSN11__gnu_debug14_Safe_sequenceIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS4_EEEEE
+C
_ZTIN11__gnu_debug14_Safe_sequenceIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS4_EEEEE
+C
_ZTSN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPN34_GLOBAL__N_a.cpp_00000000_CF506A071AEN10__gnu_norm6vectorIS4_SaIS4_EEEEEN15__gnu_debug_def6vectorIS4_S8_EEEE
+C
_ZTIN11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPN34_GLOBAL__N_a.cpp_00000000_CF506A071AEN10__gnu_norm6vectorIS4_SaIS4_EEEEEN15__gnu_debug_def6vectorIS4_S8_EEEE
+C _ZTSN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
+C _ZTIN15__gnu_debug_def6vectorIN34_GLOBAL__N_a.cpp_00000000_CF506A071AESaIS2_EEE
 O _ZN11__gnu_debug16__check_singularIcEEbPKT_
 O _ZN11__gnu_debug18__valid_range_aux2IPKcEEbRKT_S5_St26random_access_iterator_tag
 O _ZN11__gnu_debug16__check_singularIhEEbPKT_

Actual results:
several collect: recompiling a.cpp; collect: relinking during step2

Expected results:
no recomiling, since a.rpo from previous build is still present

Additional info:
seems like a problem with different symbol names due to different -frandom-seed=
gcc should use same seed with -frepo or something

Comment 1 Alexandre Oliva 2007-03-09 12:24:21 UTC
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00540.html

Comment 2 Jakub Jelinek 2007-03-13 13:53:33 UTC
Should be fixed in gcc-4.1.2-4 in rawhide.


Note You need to log in before you can comment on or make changes to this bug.