public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26514]  New: Wrong assembler code with -fprofile-generate
@ 2006-03-01 17:15 strieder at informatik dot uni-kl dot de
  2006-03-01 17:17 ` [Bug middle-end/26514] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: strieder at informatik dot uni-kl dot de @ 2006-03-01 17:15 UTC (permalink / raw)
  To: gcc-bugs

Hello,

this is a quite mysterious bug, for several reasons.

There are two classes, which differ only in their name, and a few places, where
another
constant value is returned or another function is called. One of them succeeds
with g++-4.1.0
the other fails, when using -fprofile-generate.

g++ -g -O2 -fprofile-generate -frandom-seed=0  -I. -I/home/strieder/xssr/sys
-I/home/strieder/xssr/sys/xssr-gui   -DINLINE='inline' -DDO_INLINE 
-DQT_THREAD_SUPPORT  -c -o StringReductionOrderingSyllablePartialNTTBLeftImpl.o
/home/strieder/xssr/sys/StringReductionOrderingSyllablePartialNTTBLeftImpl.cc
/tmp/ccde2ont.s: Assembler messages:
/tmp/ccde2ont.s:77: Error: unrecognized symbol type ""
/tmp/ccde2ont.s:77: Error: junk at end of line, first unrecognized character is
`0'
/tmp/ccde2ont.s:78: Error: junk at end of line, first unrecognized character is
`0'
/tmp/ccde2ont.s:124: Error: expected comma after name `' in .size directive
/tmp/ccde2ont.s:142: Error: junk `static_initialization_and_destruction_0ii'
after expression

These are line 77, 78 and 124 in the assembler code for the failing file:

77:        .type   000000static_initialization_and_destruction_0ii, @function
78: 000000static_initialization_and_destruction_0ii:

124:        .size   000000static_initialization_and_destruction_0ii,
.-000000static_initialization_and_
destruction_0ii

These are line 77, 78 and 124 in the assembler code for the working file:

77:        .type   _Z41__static_initialization_and_destruction_0ii, @function
78: _Z41__static_initialization_and_destruction_0ii:

124:         .size   _Z41__static_initialization_and_destruction_0ii,
.-_Z41__static_initialization_and_
destruction_0ii

I cannot reproduce the problem with the preprocessed file created by g++ -v
-save-temps.
So I don't know what code to include, besides the full sources, which is a lot.
Both runs 
following succeed in that order.

g++ -v -save-temps -g -O2 -fprofile-generate -frandom-seed=0  -I.
-I/home/strieder/xssr/sys -I/home/strieder/xssr/sys/xssr-gui  
-DINLINE='inline' -DDO_INLINE  -DQT_THREAD_SUPPORT  -c -o
StringReductionOrderingSyllablePartialNTTBLeftImpl.o
/home/strieder/xssr/sys/StringReductionOrderingSyllablePartialNTTBLeftImpl.cc 

g++ -g -O2 -fprofile-generate -frandom-seed=0  -I. -I/home/strieder/xssr/sys
-I/home/strieder/xssr/sys/xssr-gui   -DINLINE='inline' -DDO_INLINE 
-DQT_THREAD_SUPPORT  -c -o StringReductionOrderingSyllablePartialNTTBLeftImpl.o
StringReductionOrderingSyllablePartialNTTBLeftImpl.ii 

Another detail to add:

g++-4.1.0-20060223, the last prerelease, shows an ICE on the file failing under
g++-4.1.0,
and works without problems on the similar file. I cannot tell, whether this is
related to the
problem above.

LANG=C g++ -g -O2 -fprofile-generate -frandom-seed=0  -I.
-I/home/strieder/xssr/sys -I/home/strieder/xssr/sys/xssr-gui  
-DINLINE='inline' -DDO_INLINE  -DQT_THREAD_SUPPORT  -S -o
StringReductionOrderingSyllablePartialNTTBLeftImpl.s
/home/strieder/xssr/sys/StringReductionOrderingSyllablePartialNTTBLeftImpl.cc
/home/strieder/xssr/sys/StringReductionOrderingSyllablePartialNTTBLeftImpl.cc:
In destructor
'Xs_StringReductionOrderingSyllablePartialNTTBLeftImpl::~Xs_StringReductionOrderingSyllablePartialNTTBLeftImpl()':
/home/strieder/xssr/sys/StringReductionOrderingSyllablePartialNTTBLeftImpl.cc:172:
internal compiler error: Segmentation fault

There are no problems with g++-4.0.2.

This seems all rather mysterious to me. Should I make a second bug report for
the ICE in the already obsolete prerelease?

Please feel free to contact me on this. I might be out of office occasionally
during the next
 weeks so don't hold your breath.

Bernd Strieder


-- 
           Summary: Wrong assembler code with -fprofile-generate
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: strieder at informatik dot uni-kl dot de
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
@ 2006-03-01 17:17 ` pinskia at gcc dot gnu dot org
  2006-03-01 17:21 ` strieder at informatik dot uni-kl dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-01 17:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-03-01 17:17 -------
Can you try the 4.1.0 release?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
  2006-03-01 17:17 ` [Bug middle-end/26514] " pinskia at gcc dot gnu dot org
@ 2006-03-01 17:21 ` strieder at informatik dot uni-kl dot de
  2006-03-01 17:23 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: strieder at informatik dot uni-kl dot de @ 2006-03-01 17:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from strieder at informatik dot uni-kl dot de  2006-03-01 17:21 -------
Created an attachment (id=10947)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10947&action=view)
The preprocessed file from the failing run, which does itself not show the
problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
  2006-03-01 17:17 ` [Bug middle-end/26514] " pinskia at gcc dot gnu dot org
  2006-03-01 17:21 ` strieder at informatik dot uni-kl dot de
@ 2006-03-01 17:23 ` pinskia at gcc dot gnu dot org
  2006-03-01 17:26 ` strieder at informatik dot uni-kl dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-01 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-03-01 17:23 -------
Also if you try to compile it again does it work?  Meaning without -save-temps,
it works?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
                   ` (2 preceding siblings ...)
  2006-03-01 17:23 ` pinskia at gcc dot gnu dot org
@ 2006-03-01 17:26 ` strieder at informatik dot uni-kl dot de
  2006-03-01 17:35 ` strieder at informatik dot uni-kl dot de
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: strieder at informatik dot uni-kl dot de @ 2006-03-01 17:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from strieder at informatik dot uni-kl dot de  2006-03-01 17:26 -------
Created an attachment (id=10948)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10948&action=view)
diff of the preprocessed files from not-working to working

Although the preprocessed files themselves do not show any problem, the actual
differences
might help.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
                   ` (3 preceding siblings ...)
  2006-03-01 17:26 ` strieder at informatik dot uni-kl dot de
@ 2006-03-01 17:35 ` strieder at informatik dot uni-kl dot de
  2006-03-01 17:37 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: strieder at informatik dot uni-kl dot de @ 2006-03-01 17:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from strieder at informatik dot uni-kl dot de  2006-03-01 17:35 -------
(In reply to comment #3)
> Also if you try to compile it again does it work?  Meaning without -save-temps,
> it works?
> 

If I use the .ii file instead of the original .cc file with exactly the same
options, then it compiles, no error at all. Only the non-preprocessed file
fails.


-- 

strieder at informatik dot uni-kl dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.1.0
      Known to work|                            |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
                   ` (4 preceding siblings ...)
  2006-03-01 17:35 ` strieder at informatik dot uni-kl dot de
@ 2006-03-01 17:37 ` pinskia at gcc dot gnu dot org
  2006-03-01 17:42 ` strieder at informatik dot uni-kl dot de
  2008-01-26 12:52 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-01 17:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-03-01 17:37 -------
I tried my best to reproduce this, using  --param ggc-min-expand=0 --param
ggc-min-heapsize=0 as I thought it was a GC issue as that is usually what is
causes the difference between with and without -save-temps.  I tried all the
tricks I know and still cannot reproduce this.



I mean try compiling with the .cc again, do you see the failure?


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
                   ` (5 preceding siblings ...)
  2006-03-01 17:37 ` pinskia at gcc dot gnu dot org
@ 2006-03-01 17:42 ` strieder at informatik dot uni-kl dot de
  2008-01-26 12:52 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: strieder at informatik dot uni-kl dot de @ 2006-03-01 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from strieder at informatik dot uni-kl dot de  2006-03-01 17:42 -------
(In reply to comment #6)
> I tried my best to reproduce this, using  --param ggc-min-expand=0 --param
> ggc-min-heapsize=0 as I thought it was a GC issue as that is usually what is
> causes the difference between with and without -save-temps.  I tried all the
> tricks I know and still cannot reproduce this.
> 
> 
> 
> I mean try compiling with the .cc again, do you see the failure?
> 

All runs I tried are repeatable, always the same outcome.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/26514] Wrong assembler code with -fprofile-generate
  2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
                   ` (6 preceding siblings ...)
  2006-03-01 17:42 ` strieder at informatik dot uni-kl dot de
@ 2008-01-26 12:52 ` rguenth at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-26 12:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2008-01-26 12:31 -------
We cannot help here.  Please re-open if you have a testcase that we can use
to reproduce the problem and after trying the latest releases, 4.1.2 or 4.2.2.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26514


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-26 12:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01 17:15 [Bug c++/26514] New: Wrong assembler code with -fprofile-generate strieder at informatik dot uni-kl dot de
2006-03-01 17:17 ` [Bug middle-end/26514] " pinskia at gcc dot gnu dot org
2006-03-01 17:21 ` strieder at informatik dot uni-kl dot de
2006-03-01 17:23 ` pinskia at gcc dot gnu dot org
2006-03-01 17:26 ` strieder at informatik dot uni-kl dot de
2006-03-01 17:35 ` strieder at informatik dot uni-kl dot de
2006-03-01 17:37 ` pinskia at gcc dot gnu dot org
2006-03-01 17:42 ` strieder at informatik dot uni-kl dot de
2008-01-26 12:52 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).