public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12472] [tree-ssa] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
@ 2003-10-01  3:46 ` pinskia at gcc dot gnu dot org
  2003-10-06 20:45 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01  3:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |tree-ssa


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

* [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype
@ 2003-10-01  3:46 pinskia at gcc dot gnu dot org
  2003-10-01  3:46 ` [Bug optimization/12472] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-01  3:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [tree-ssa] miscompiles stage-2's gengtype
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: wrong-code, build
          Severity: critical
          Priority: P1
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-apple-darwin

Read <http://gcc.gnu.org/ml/gcc/2003-09/msg01190.html> and <http://gcc.gnu.org/ml/gcc/
2003-09/msg01206.html>.
Main just is that GCC miscompiles gengtype's update_lineno which cause a segfault.
The main difference between powerpc-apple-darwin and any other target is that it defines 
BOOL_TYPE_SIZE to be INT_TYPE_SIZE (so that _Bool is of size 4 instead of 1).
Even trying with commenting that line out, bootstrap does not pass.
Also note that the problem is not the trees that are causing the problem so it might be a problem 
on the mainline also.


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

* [Bug optimization/12472] [tree-ssa] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
  2003-10-01  3:46 ` [Bug optimization/12472] " pinskia at gcc dot gnu dot org
@ 2003-10-06 20:45 ` pinskia at gcc dot gnu dot org
  2003-10-14 21:17 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-06 20:45 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

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


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-06 20:45 -------
*** Bug 12528 has been marked as a duplicate of this bug. ***


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

* [Bug optimization/12472] [tree-ssa] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
  2003-10-01  3:46 ` [Bug optimization/12472] " pinskia at gcc dot gnu dot org
  2003-10-06 20:45 ` pinskia at gcc dot gnu dot org
@ 2003-10-14 21:17 ` pinskia at gcc dot gnu dot org
  2003-10-15  0:09 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-14 21:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-14 21:17:27
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-14 21:17 -------
If I disable all the RTL optimizers by editing opts.c and #if 0 out the code to turn them on, I get 
passed this point.


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

* [Bug optimization/12472] [tree-ssa] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2003-10-14 21:17 ` pinskia at gcc dot gnu dot org
@ 2003-10-15  0:09 ` pinskia at gcc dot gnu dot org
  2003-10-15  1:29 ` [Bug optimization/12472] [tree-ssa] [loop-optimize] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-15  0:09 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-15 00:09 -------
This is caused by one of the following two options:
      flag_loop_optimize = 1;
      flag_crossjumping = 1;

Both are RTL based optimizers, if I have some more time to work on this I will.


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

* [Bug optimization/12472] [tree-ssa] [loop-optimize] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2003-10-15  0:09 ` pinskia at gcc dot gnu dot org
@ 2003-10-15  1:29 ` pinskia at gcc dot gnu dot org
  2003-10-15  2:33 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-15  1:29 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[tree-ssa] miscompiles      |[tree-ssa] [loop-optimize]
                   |stage-2's gengtype          |miscompiles stage-2's
                   |                            |gengtype


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-15 01:29 -------
Okay I have narrowed it down to
      flag_loop_optimize = 1;

Now I need to find out what it is doing to cause the miscompile.


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

* [Bug optimization/12472] [tree-ssa] [loop-optimize] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2003-10-15  1:29 ` [Bug optimization/12472] [tree-ssa] [loop-optimize] " pinskia at gcc dot gnu dot org
@ 2003-10-15  2:33 ` pinskia at gcc dot gnu dot org
  2003-10-15  3:32 ` [Bug optimization/12472] [tree-ssa] [doloop] " pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-15  2:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-15 02:33 -------
It is looking more like flag_branch_on_count_reg which is causing it.


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2003-10-15  2:33 ` pinskia at gcc dot gnu dot org
@ 2003-10-15  3:32 ` pinskia at gcc dot gnu dot org
  2003-10-16  0:36 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-15  3:32 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-15 03:32 -------
I have verified that it is flag_branch_on_count_reg which is causing it, I will look more at 
it tomorrow.


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2003-10-15  3:32 ` [Bug optimization/12472] [tree-ssa] [doloop] " pinskia at gcc dot gnu dot org
@ 2003-10-16  0:36 ` pinskia at gcc dot gnu dot org
  2003-10-16  0:49 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16  0:36 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-16 00:36 -------
This is another RTL optimization problem after the doloop optimization is fixed.
It is caused by one of following options:
      flag_optimize_sibling_calls = 1;
      flag_cse_follow_jumps = 1;
      flag_cse_skip_blocks = 1;
I am trying to narrow it down as I write this.


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2003-10-16  0:36 ` pinskia at gcc dot gnu dot org
@ 2003-10-16  0:49 ` pinskia at gcc dot gnu dot org
  2003-10-16  2:16 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16  0:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-16 00:49 -------
Down to two:
      flag_optimize_sibling_calls = 1;
      flag_cse_skip_blocks = 1;


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2003-10-16  0:49 ` pinskia at gcc dot gnu dot org
@ 2003-10-16  2:16 ` pinskia at gcc dot gnu dot org
  2003-11-04  5:25 ` pinskia at gcc dot gnu dot org
  2003-11-18 22:53 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-16  2:16 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-16 02:16 -------
So the final two options which are causing the miscompile on powerpc-darwin are:
      flag_optimize_sibling_calls = 1;  (-foptimize-sibling-calls)
flag_branch_on_count_reg (-fbranch-on-count-reg)
Both are enabled at -O2.


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2003-10-16  2:16 ` pinskia at gcc dot gnu dot org
@ 2003-11-04  5:25 ` pinskia at gcc dot gnu dot org
  2003-11-18 22:53 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-04  5:25 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-10-14 21:17:27         |2003-11-04 05:25:48
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-04 05:25 -------
One more thing, the tree-ssa adds 
	addi r4,r4,-1 to the asm for some reason, other than that it is identical to the mainline.


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

* [Bug optimization/12472] [tree-ssa] [doloop] miscompiles stage-2's gengtype
  2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2003-11-04  5:25 ` pinskia at gcc dot gnu dot org
@ 2003-11-18 22:53 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-18 22:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-18 22:53 -------
What is cool is this patch is no longer needed so closing as fixed because it passes the spot where 
the problem is.

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


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


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

end of thread, other threads:[~2003-11-18 22:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01  3:46 [Bug optimization/12472] New: [tree-ssa] miscompiles stage-2's gengtype pinskia at gcc dot gnu dot org
2003-10-01  3:46 ` [Bug optimization/12472] " pinskia at gcc dot gnu dot org
2003-10-06 20:45 ` pinskia at gcc dot gnu dot org
2003-10-14 21:17 ` pinskia at gcc dot gnu dot org
2003-10-15  0:09 ` pinskia at gcc dot gnu dot org
2003-10-15  1:29 ` [Bug optimization/12472] [tree-ssa] [loop-optimize] " pinskia at gcc dot gnu dot org
2003-10-15  2:33 ` pinskia at gcc dot gnu dot org
2003-10-15  3:32 ` [Bug optimization/12472] [tree-ssa] [doloop] " pinskia at gcc dot gnu dot org
2003-10-16  0:36 ` pinskia at gcc dot gnu dot org
2003-10-16  0:49 ` pinskia at gcc dot gnu dot org
2003-10-16  2:16 ` pinskia at gcc dot gnu dot org
2003-11-04  5:25 ` pinskia at gcc dot gnu dot org
2003-11-18 22:53 ` pinskia 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).