Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 19232
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Kaveh Ghazi <ghazi@gcc.gnu.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 19232 depends on: Show dependency tree
Show dependency graph
Bug 19232 blocks: 23224

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-11-26 01:45 Opened: 2005-01-02 18:25
When running the testsuite with mainline on i686-pc-linux-gnu with -fpic or -
fPIC, I get the following additional failures:

FAIL: gcc.dg/assign-warn-3.c  (test for warnings, line 9)
FAIL: gcc.dg/assign-warn-3.c  (test for warnings, line 13)

The expected warnings simply fail to appear with the extra flag.  Warning 
output should not be affected by this.

------- Comment #1 From Andrew Pinski 2005-01-03 15:31 -------
I cannot reproduce this with a cross from a couple of days ago.

------- Comment #2 From Volker Reichelt 2005-01-03 17:36 -------
With today's mainline I get the following results which confirm
Kaveh's observations:

gcc -c -O assign-warn-3.c:         no warning       
gcc -c -O2 assign-warn-3.c:        no warning
gcc -c -O3 assign-warn-3.c:        warning
gcc -c -O assign-warn-3.c -fpic:   no warning
gcc -c -O2 assign-warn-3.c -fpic:  no warning
gcc -c -O3 assign-warn-3.c -fpic:  no warning !!!

That no warning is emitted with -O and -O2 is expected since no
inlining takes place.

Just for curiosity I marked f0 and f1 in the test as inline and
got the following results:

gcc -c -O assign-warn-3.c:         no warning !!!
gcc -c -O2 assign-warn-3.c:        warning
gcc -c -O3 assign-warn-3.c:        warning
gcc -c -O assign-warn-3.c -fpic:   warning
gcc -c -O2 assign-warn-3.c -fpic:  warning
gcc -c -O3 assign-warn-3.c -fpic:  warning

Here I'd expect a warning in all six cases.

------- Comment #3 From Andrew Pinski 2005-01-03 17:59 -------
(In reply to comment #2)
> With today's mainline I get the following results which confirm
> Kaveh's observations:
> 
> gcc -c -O assign-warn-3.c:         no warning       
> gcc -c -O2 assign-warn-3.c:        no warning
> gcc -c -O3 assign-warn-3.c:        warning
> gcc -c -O assign-warn-3.c -fpic:   no warning
> gcc -c -O2 assign-warn-3.c -fpic:  no warning
> gcc -c -O3 assign-warn-3.c -fpic:  no warning !!!

To repsond to this one, with -fpic/PIC we don't inline functions which can be overridden by other TUs.

------- Comment #4 From Andrew Pinski 2005-11-29 04:03 -------
(In reply to comment #3)
> To repsond to this one, with -fpic/PIC we don't inline functions which can be overridden by other TUs.

More to the point, this testcase is only testing when inlining which means with
-fPIC it does not inline at all.

------- Comment #5 From Daniel Jacobowitz 2007-08-02 21:59 -------
Nathan Froyd checked in a patch for this.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug