public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
@ 2004-05-24  1:29 kpfleming at backtobasicsmgmt dot com
  2004-05-24  1:34 ` [Bug c/15617] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: kpfleming at backtobasicsmgmt dot com @ 2004-05-24  1:29 UTC (permalink / raw)
  To: gcc-bugs

Using gcc-3.4.1-20040517, building groff-1.19.1 with these CFLAGS: "-Os
-march=pentium4 -pipe" causes a sig 11 when the Makefile tries to produce pic.ps.

Using "-Os -march=pentium3 -pipe" does not cause this problem. The builds are
being done on a P4 2.6C with hyperthreading, running a current glibc snapshot
and the 2.6.6 Linux kernel.

-- 
           Summary: building groff-1.19.1 with "-Os -march=pentium4" causes
                    sig 11
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kpfleming at backtobasicsmgmt dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
@ 2004-05-24  1:34 ` pinskia at gcc dot gnu dot org
  2004-05-29  0:06 ` [Bug target/15617] " reichelt at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24  1:34 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
  2004-05-24  1:34 ` [Bug c/15617] " pinskia at gcc dot gnu dot org
@ 2004-05-29  0:06 ` reichelt at gcc dot gnu dot org
  2004-05-29  0:12 ` reichelt at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-05-29  0:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-05-28 16:07 -------
Confirmed.

BTW, I also had to set CXXFLAGS to the value mentioned above.

It's actually the program "pic" located in "groff-1.19.1/src/preproc/pic"
that crashes. I'll add a minimal input file for the miscompiled "pic" that
triggers the segfault.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
          Component|c                           |target


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
  2004-05-24  1:34 ` [Bug c/15617] " pinskia at gcc dot gnu dot org
  2004-05-29  0:06 ` [Bug target/15617] " reichelt at gcc dot gnu dot org
@ 2004-05-29  0:12 ` reichelt at gcc dot gnu dot org
  2004-06-02  1:47 ` reichelt at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-05-29  0:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-05-28 16:10 -------
Created an attachment (id=6418)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6418&action=view)
trigger for bug in miscompiled "pic"


-- 


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (2 preceding siblings ...)
  2004-05-29  0:12 ` reichelt at gcc dot gnu dot org
@ 2004-06-02  1:47 ` reichelt at gcc dot gnu dot org
  2004-06-02  1:58 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-06-02  1:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-06-02 01:47 -------
The culprit is in the function box_object::print() in object.cpp,
where the program crashes. Removing the following 4 lines from the
assembler code makes things work again (the lines are missing if
one compiles the code with -march=pentium3):

========================================================
--- object.s	2004-06-02 03:02:24.000000000 +0200
+++ object.s	2004-06-02 03:01:24.000000000 +0200
@@ -5217,11 +5217,9 @@ _ZN10box_object5printEv:
 	subl	$8, %esp
 	leal	-124(%ebp), %esi
 	fchs
-	movsd	.LC125, %xmm0
 	leal	-108(%ebp), %ebx
 	fstpl	(%esp)
 	pushl	-24(%ebp)
-	movaps	%xmm0, -144(%ebp)
 	pushl	-28(%ebp)
 	pushl	%esi
 .LCFI482:
@@ -5331,9 +5329,7 @@ _ZN10box_object5printEv:
 	subl	$16, %esp
 	leal	-124(%ebp), %ebx
 	fldl	76(%eax)
-	movsd	.LC126, %xmm0
 	fabs
-	movaps	%xmm0, -160(%ebp)
 	fstpl	8(%esp)
 	fldl	68(%eax)
 	fabs
========================================================

I'll attach a short self-contained testcase to reproduce the function
box_object::print(). Just compile with "g++ -Os -march=pentium4".
(The assembler labels are of course different, but there are only
four lines that contain %xmm0.)

To actually run the code one has to build groff, though.
So this testcase is not completely self-contained,
but maybe this is enough to identify the bug.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-02 01:47:24
               date|                            |


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (3 preceding siblings ...)
  2004-06-02  1:47 ` reichelt at gcc dot gnu dot org
@ 2004-06-02  1:58 ` pinskia at gcc dot gnu dot org
  2004-07-04  0:36 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02  1:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 01:58 -------
This looks like a case where the stack pointer is misaligned, movaps requires 16byte (128bit) aligned 
addresses So this caused by -Os implying -mpreferred-stack-boundary=32 which is wrong for SSE.  
Maybe the fix would be to imply -mpreferred-stack-boundary=128 if -msse (or is it -msse2) is turned 
on with -Os, this also causes var_arg25.c (I think) to fail at -Os.

Jan I added you as CC to find your opinion  on my suggestion.  I think a huge amount of people will run 
into this if they used -Os without knowning what is going on.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (4 preceding siblings ...)
  2004-06-02  1:58 ` pinskia at gcc dot gnu dot org
@ 2004-07-04  0:36 ` pinskia at gcc dot gnu dot org
  2004-07-10  2:06 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04  0:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-04 00:36 -------
*** Bug 16354 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jbuck at gcc dot gnu dot org


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (5 preceding siblings ...)
  2004-07-04  0:36 ` pinskia at gcc dot gnu dot org
@ 2004-07-10  2:06 ` pinskia at gcc dot gnu dot org
  2004-07-10  2:07 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-10  2:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-10 02:06 -------
Fixed by:
>       * config/i386/i386.c (init_cumulative_args): Set mmx/sse registers
>       available for use only when TARGET_MMX/_SSE is set, and check for
>       variable argument function if any register count is non-zero.
>       (function_arg): Correctly suppress repeated warnings for passing SSE
>       vectors are arguments without SSE enabled.
>       (ix86_function_arg_boundary): Without SSE enabled, the use of what
>       would be SSE register modes does no longer influence the alignment.

-- 


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (6 preceding siblings ...)
  2004-07-10  2:06 ` pinskia at gcc dot gnu dot org
@ 2004-07-10  2:07 ` pinskia at gcc dot gnu dot org
  2004-07-12 12:29 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-10  2:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-10 02:07 -------
Fixed by:
>       * config/i386/i386.c (init_cumulative_args): Set mmx/sse registers
>       available for use only when TARGET_MMX/_SSE is set, and check for
>       variable argument function if any register count is non-zero.
>       (function_arg): Correctly suppress repeated warnings for passing SSE
>       vectors are arguments without SSE enabled.
>       (ix86_function_arg_boundary): Without SSE enabled, the use of what
>       would be SSE register modes does no longer influence the alignment.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.5.0


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (7 preceding siblings ...)
  2004-07-10  2:07 ` pinskia at gcc dot gnu dot org
@ 2004-07-12 12:29 ` reichelt at gcc dot gnu dot org
  2004-07-17 19:29 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-12 12:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-07-12 12:29 -------
Not fixed.
We still crash at the same position.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (8 preceding siblings ...)
  2004-07-12 12:29 ` reichelt at gcc dot gnu dot org
@ 2004-07-17 19:29 ` pinskia at gcc dot gnu dot org
  2005-02-18 15:55 ` uros at kss-loka dot si
  2005-08-15  0:46 ` mueller at kde dot org
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 19:29 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (9 preceding siblings ...)
  2004-07-17 19:29 ` pinskia at gcc dot gnu dot org
@ 2005-02-18 15:55 ` uros at kss-loka dot si
  2005-08-15  0:46 ` mueller at kde dot org
  11 siblings, 0 replies; 14+ messages in thread
From: uros at kss-loka dot si @ 2005-02-18 15:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From uros at kss-loka dot si  2005-02-18 06:45 -------
FYI: gcc 4.0 doesn't generate any SSE instructions for testcase.cc:

gcc -Os -march=pentium4 -S testcase.cc
grep xmm testcase.s | wc -l
      0


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.0.0


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
  2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
                   ` (10 preceding siblings ...)
  2005-02-18 15:55 ` uros at kss-loka dot si
@ 2005-08-15  0:46 ` mueller at kde dot org
  11 siblings, 0 replies; 14+ messages in thread
From: mueller at kde dot org @ 2005-08-15  0:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mueller at kde dot org  2005-08-15 00:46 -------
duplicate of #13685 ? 

-- 


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


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

* [Bug target/15617] building groff-1.19.1 with "-Os -march=pentium4" causes sig 11
       [not found] <bug-15617-8604@http.gcc.gnu.org/bugzilla/>
@ 2006-02-21 12:38 ` belyshev at depni dot sinp dot msu dot ru
  0 siblings, 0 replies; 14+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2006-02-21 12:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from belyshev at depni dot sinp dot msu dot ru  2006-02-21 12:38 -------
(In reply to comment #11)
> duplicate of #13685 ? 
> 

yes.


*** This bug has been marked as a duplicate of 13685 ***


-- 

belyshev at depni dot sinp dot msu dot ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2006-02-21 12:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24  1:29 [Bug c/15617] New: building groff-1.19.1 with "-Os -march=pentium4" causes sig 11 kpfleming at backtobasicsmgmt dot com
2004-05-24  1:34 ` [Bug c/15617] " pinskia at gcc dot gnu dot org
2004-05-29  0:06 ` [Bug target/15617] " reichelt at gcc dot gnu dot org
2004-05-29  0:12 ` reichelt at gcc dot gnu dot org
2004-06-02  1:47 ` reichelt at gcc dot gnu dot org
2004-06-02  1:58 ` pinskia at gcc dot gnu dot org
2004-07-04  0:36 ` pinskia at gcc dot gnu dot org
2004-07-10  2:06 ` pinskia at gcc dot gnu dot org
2004-07-10  2:07 ` pinskia at gcc dot gnu dot org
2004-07-12 12:29 ` reichelt at gcc dot gnu dot org
2004-07-17 19:29 ` pinskia at gcc dot gnu dot org
2005-02-18 15:55 ` uros at kss-loka dot si
2005-08-15  0:46 ` mueller at kde dot org
     [not found] <bug-15617-8604@http.gcc.gnu.org/bugzilla/>
2006-02-21 12:38 ` belyshev at depni dot sinp dot msu dot ru

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).