public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000
@ 2003-10-27  6:19 pinskia at gcc dot gnu dot org
  2003-10-27  7:01 ` [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-27  6:19 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=12786

           Summary: -fvpt does not work with signed mod with a const of
                    0x80000000
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         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

Compile a program like this
gcc test.c main.c -fprofile-arcs -fvpt -O3
and run the resulting program and you will recieve an error:
profiling:/home/gates/pinskia/src/testl/test.gcda:Overflow merging
::::::::::::::
test.c
::::::::::::::
int mod(int i, int j)
{
        return i % j;
}
::::::::::::::
main.c
::::::::::::::
int mod(int,int);
int t;
int main()
{
        int j = 0x80000000;
        t = mod(0, j);
}


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

* [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
@ 2003-10-27  7:01 ` pinskia at gcc dot gnu dot org
  2004-02-06  1:28 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-27  7:01 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=12786


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-fvpt does not work with    |-fvpt does not work with
                   |signed mod with a const of  |signed mod or signed divide
                   |0x80000000                  |with a constant negative
                   |                            |number


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-27 06:19 -------
Regeneratizing the summary as any negative number will cause it or a divide will do the 
same.


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

* [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
  2003-10-27  7:01 ` [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number pinskia at gcc dot gnu dot org
@ 2004-02-06  1:28 ` pinskia at gcc dot gnu dot org
  2004-04-20 11:38 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-06  1:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-06 01:28 -------
Well noone has confirmed this at all, even though this one was reported by me, I can confirm this 
on the tree-ssa, 3.4.0 and 3.5.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |tree-ssa 3.4.0 3.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-02-06 01:28:27
               date|                            |


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


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

* [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
  2003-10-27  7:01 ` [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number pinskia at gcc dot gnu dot org
  2004-02-06  1:28 ` pinskia at gcc dot gnu dot org
@ 2004-04-20 11:38 ` pinskia at gcc dot gnu dot org
  2004-04-20 11:46 ` veksler at il dot ibm dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20 11:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-20 11:05 -------
*** Bug 15022 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |veksler at il dot ibm dot
                   |                            |com


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


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

* [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-04-20 11:38 ` pinskia at gcc dot gnu dot org
@ 2004-04-20 11:46 ` veksler at il dot ibm dot com
  2004-04-20 12:02 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: veksler at il dot ibm dot com @ 2004-04-20 11:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From veksler at il dot ibm dot com  2004-04-20 11:23 -------
The test case of 15022 is much simpler that the one here:
  int a=-1;
  int main()
  {
      return -100/a;
  }
Error message is different - is it the same bug (or just happens to be in the
same buggy area)?

-- 


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


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

* [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-04-20 11:46 ` veksler at il dot ibm dot com
@ 2004-04-20 12:02 ` pinskia at gcc dot gnu dot org
  2004-08-17 10:35 ` [Bug rtl-optimization/12786] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-20 12:02 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-04-20 11:28 -------
The reason why the error reported by me is different from what you reported, is that the error message 
for my testcase has changed to the same error message as yours:
profiling:/home/gates/pinskia/src/gnu/gcctest/pr12786/test.gcda:Overflow writing

-- 


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


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

* [Bug rtl-optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-04-20 12:02 ` pinskia at gcc dot gnu dot org
@ 2004-08-17 10:35 ` pinskia at gcc dot gnu dot org
  2005-03-04  3:18 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-17 10:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-17 10:35 -------
I found out today that gcov_write_counter errors out when the input is negative so it must related to 
that and it would be code in gcov_exit where the problem is.

-- 


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


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

* [Bug rtl-optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-08-17 10:35 ` [Bug rtl-optimization/12786] " pinskia at gcc dot gnu dot org
@ 2005-03-04  3:18 ` pinskia at gcc dot gnu dot org
  2005-07-31  6:15 ` [Bug gcov/profile/12786] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-04  3:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-04 03:18 -------
*** Bug 20310 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nomura at netapp dot com


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


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

* [Bug gcov/profile/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-03-04  3:18 ` pinskia at gcc dot gnu dot org
@ 2005-07-31  6:15 ` pinskia at gcc dot gnu dot org
  2005-07-31  7:30 ` veksler at il dot ibm dot com
  2005-07-31 17:12 ` pinskia at physics dot uc dot edu
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-31  6:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-31 06:07 -------
Fixed on the mainline by moving over to the tree based profiling.

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


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


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

* [Bug gcov/profile/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-07-31  6:15 ` [Bug gcov/profile/12786] " pinskia at gcc dot gnu dot org
@ 2005-07-31  7:30 ` veksler at il dot ibm dot com
  2005-07-31 16:56   ` Andrew Pinski
  2005-07-31 17:12 ` pinskia at physics dot uc dot edu
  9 siblings, 1 reply; 12+ messages in thread
From: veksler at il dot ibm dot com @ 2005-07-31  7:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From veksler at il dot ibm dot com  2005-07-31 07:24 -------
Does it mean that it won't be fixed neither on gcc-3.4 nor gcc-4.0 branches?
By marking it "resolved" will it not hide this PR when number of open
issues is counted for gcc-3.4 and gcc-4.0 branches?

-- 


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


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

* Re: [Bug gcov/profile/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2005-07-31  7:30 ` veksler at il dot ibm dot com
@ 2005-07-31 16:56   ` Andrew Pinski
  0 siblings, 0 replies; 12+ messages in thread
From: Andrew Pinski @ 2005-07-31 16:56 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

> 
> 
> ------- Additional Comments From veksler at il dot ibm dot com  2005-07-31 07:24 -------
> Does it mean that it won't be fixed neither on gcc-3.4 nor gcc-4.0 branches?

Yes.

> By marking it "resolved" will it not hide this PR when number of open
> issues is counted for gcc-3.4 and gcc-4.0 branches?

This was not a regression and has always been an issue when vpt was added.
both 3.4 and 4.0 branches are release mode which means only regressions and
bugs which cause a lot of trouble.

For this bug, you have to backport the tree based value profiling and then
turn remove the rtl based value profiling (or turn tree based ones by default).
Both are huge and too dangerous at this point and not even due-able for the
3.4 branch.


This is GCC's policy to close bugs which are not regressions which are fixed
in the mainline.

-- Pinski


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

* [Bug gcov/profile/12786] -fvpt does not work with signed mod or signed divide with a constant negative number
  2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-07-31  7:30 ` veksler at il dot ibm dot com
@ 2005-07-31 17:12 ` pinskia at physics dot uc dot edu
  9 siblings, 0 replies; 12+ messages in thread
From: pinskia at physics dot uc dot edu @ 2005-07-31 17:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at physics dot uc dot edu  2005-07-31 16:56 -------
Subject: Re: [Bug gcov/profile/12786] -fvpt does not work with signed mod or signed divide with a constant negative number

> 
> 
> ------- Additional Comments From veksler at il dot ibm dot com  2005-07-31 07:24 -------
> Does it mean that it won't be fixed neither on gcc-3.4 nor gcc-4.0 branches?

Yes.

> By marking it "resolved" will it not hide this PR when number of open
> issues is counted for gcc-3.4 and gcc-4.0 branches?

This was not a regression and has always been an issue when vpt was added.
both 3.4 and 4.0 branches are release mode which means only regressions and
bugs which cause a lot of trouble.

For this bug, you have to backport the tree based value profiling and then
turn remove the rtl based value profiling (or turn tree based ones by default).
Both are huge and too dangerous at this point and not even due-able for the
3.4 branch.


This is GCC's policy to close bugs which are not regressions which are fixed
in the mainline.

-- Pinski



-- 


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


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

end of thread, other threads:[~2005-07-31 16:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-27  6:19 [Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000 pinskia at gcc dot gnu dot org
2003-10-27  7:01 ` [Bug optimization/12786] -fvpt does not work with signed mod or signed divide with a constant negative number pinskia at gcc dot gnu dot org
2004-02-06  1:28 ` pinskia at gcc dot gnu dot org
2004-04-20 11:38 ` pinskia at gcc dot gnu dot org
2004-04-20 11:46 ` veksler at il dot ibm dot com
2004-04-20 12:02 ` pinskia at gcc dot gnu dot org
2004-08-17 10:35 ` [Bug rtl-optimization/12786] " pinskia at gcc dot gnu dot org
2005-03-04  3:18 ` pinskia at gcc dot gnu dot org
2005-07-31  6:15 ` [Bug gcov/profile/12786] " pinskia at gcc dot gnu dot org
2005-07-31  7:30 ` veksler at il dot ibm dot com
2005-07-31 16:56   ` Andrew Pinski
2005-07-31 17:12 ` pinskia at physics dot uc dot edu

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