public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c
@ 2012-04-23 17:00 hjl.tools at gmail dot com
  2012-04-23 18:40 ` [Bug middle-end/53088] " hubicka at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-04-23 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53088
           Summary: [4.8 Regression] gcc.target/i386/pr39082-1.c
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: hubicka@gcc.gnu.org


On Linux/x86-64, revision 186687:

http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00639.html

gave

FAIL: gcc.target/i386/pr39082-1.c  (test for warnings, line 33)

./xgcc -B./ -S ../../src-trunk/gcc/testsuite/gcc.target/i386/pr39082-1.c -O2
../../src-trunk/gcc/testsuite/gcc.target/i386/pr39082-1.c: In function ‘foo1’:
../../src-trunk/gcc/testsuite/gcc.target/i386/pr39082-1.c:16:1: note: the ABI
of passing union with long double has changed in GCC 4.4
 foo1 (union un u)
 ^

Revision 186685 gave

gcc -S -O2 gcc/gcc/testsuite/gcc.target/i386/pr39082-1.c
gcc/gcc/testsuite/gcc.target/i386/pr39082-1.c: In function ‘foo3’:
gcc/gcc/testsuite/gcc.target/i386/pr39082-1.c:33:12: note: the ABI of passing
union with long double has changed in GCC 4.4
   union un u = bar2 (x); /* { dg-message "note: the ABI of passing union with
long double has changed in GCC 4.4" } */
            ^


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
@ 2012-04-23 18:40 ` hubicka at gcc dot gnu.org
  2012-04-23 18:55 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-04-23 18:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-04-23
     Ever Confirmed|0                           |1

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-23 18:40:29 UTC ---
Mine.  i386 outputs the message with input_loc, so it seems we need to set it
correctly.


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
  2012-04-23 18:40 ` [Bug middle-end/53088] " hubicka at gcc dot gnu.org
@ 2012-04-23 18:55 ` rguenth at gcc dot gnu.org
  2012-04-24  8:23 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-23 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-23 18:54:41 UTC ---
(In reply to comment #1)
> Mine.  i386 outputs the message with input_loc, so it seems we need to set it
> correctly.

It should use some more sensible location though - input_location should be
essentially non-accessible from outside the frontend.  Also see the bogus
caret on the function prototype (which should point to the union parameter?)


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
  2012-04-23 18:40 ` [Bug middle-end/53088] " hubicka at gcc dot gnu.org
  2012-04-23 18:55 ` rguenth at gcc dot gnu.org
@ 2012-04-24  8:23 ` rguenth at gcc dot gnu.org
  2012-04-24 15:07 ` hubicka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-24  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot       |hubicka at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.8.0


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-04-24  8:23 ` rguenth at gcc dot gnu.org
@ 2012-04-24 15:07 ` hubicka at gcc dot gnu.org
  2012-04-24 15:13 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-04-24 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-24 15:07:21 UTC ---
At few places in cgraph code we set location to get those late diagnostics
right. It sort of makes sense for function wide diagnostics, but it is not this
one.

(gdb) bt
#0  inform (location=1925, gmsgid=0x379f4b8 "the ABI of passing union with long
double has changed in GCC 4.4") at ../../gcc/diagnostic.c:745
#1  0x00000000029a5f2b in classify_argument (mode=BLKmode, type=0x7ffff77a9498,
classes=0x7fffffffded0, bit_offset=0) at ../../gcc/config/i386/i386.c:6124
#2  0x00000000029a6635 in examine_argument (mode=BLKmode, type=0x7ffff77a9498,
in_return=0, int_nregs=0x7fffffffdf38, sse_nregs=0x7fffffffdf34) at
../../gcc/config/i386/i386.c:6311
#3  0x00000000029a71e9 in function_arg_advance_64 (cum=0x7fffffffe090,
mode=BLKmode, type=0x7ffff77a9498, words=2, named=1 '\001') at
../../gcc/config/i386/i386.c:6661
#4  0x00000000029a748c in ix86_function_arg_advance (cum_v={magic = 0x4a6f0a0,
p = 0x7fffffffe090}, mode=BLKmode, type=0x7ffff77a9498, named=1 '\001') at
../../gcc/config/i386/i386.c:6715
#5  0x0000000000ea45dd in gimplify_parameters () at ../../gcc/function.c:3572
#6  0x00000000010217b5 in gimplify_body (fndecl=0x7ffff77c6100, do_parms=1
'\001') at ../../gcc/gimplify.c:8140
#7  0x0000000001022e0a in gimplify_function_tree (fndecl=0x7ffff77c6100) at
../../gcc/gimplify.c:8278
#8  0x0000000000a8a229 in cgraph_analyze_function (node=0x7ffff7697750) at
../../gcc/cgraphunit.c:608
#9  0x0000000000a8b472 in cgraph_analyze_functions () at
../../gcc/cgraphunit.c:901
#10 0x0000000000a901cf in cgraph_finalize_compilation_unit () at
../../gcc/cgraphunit.c:2416
#11 0x000000000050e4f4 in c_write_global_declarations () at
../../gcc/c-decl.c:10043
#12 0x0000000001985ba3 in compile_file () at ../../gcc/toplev.c:572
#13 0x0000000001987f7d in do_compile () at ../../gcc/toplev.c:1939
#14 0x00000000019880d2 in toplev_main (argc=3, argv=0x7fffffffe7c8) at
../../gcc/toplev.c:2015
#15 0x000000000074efbb in main (argc=3, argv=0x7fffffffe7c8) at
../../gcc/main.c:36

I guess the catch is that gimplify_body is the last one knowing what statement
it is looking at.  I would expected expansion to set the source location,
right?
Outputting this on functio ndeclaration, that is still avaiable to the
cummulative arguments API is not quite right, because we would not handle
indirect calls.

Honza


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-04-24 15:07 ` hubicka at gcc dot gnu.org
@ 2012-04-24 15:13 ` hubicka at gcc dot gnu.org
  2012-04-25 11:22 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-04-24 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-24 15:12:36 UTC ---
I guess get_curr_insn_source_location is what I neeed...


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2012-04-24 15:13 ` hubicka at gcc dot gnu.org
@ 2012-04-25 11:22 ` hubicka at gcc dot gnu.org
  2012-04-25 11:32 ` hubicka at gcc dot gnu.org
  2012-09-07 11:25 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-04-25 11:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-25 11:21:52 UTC ---
Hmm, after some playing with this, I don't really know how to make the warning
output right all the time.  To fix the regression I will simply update the
testcase.
The warning now goes on different place because of different gimplification
order. We used to first gimplify the call. Now we first gimplify the function
and warn on its declaration.
It is not bad and the input_location is correctly initialized by cgraph.

I do not get any confused carret:
a.c: In function 'foo1':
a.c:16:1: note: the ABI of passing union with long double has changed in GCC
4.4
 foo1 (union un u)
 ^


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2012-04-25 11:22 ` hubicka at gcc dot gnu.org
@ 2012-04-25 11:32 ` hubicka at gcc dot gnu.org
  2012-09-07 11:25 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-04-25 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-25 11:31:47 UTC ---
Author: hubicka
Date: Wed Apr 25 11:31:42 2012
New Revision: 186815

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186815
Log:
    PR middle-end/53088
    * gcc.target/i386/pr39082-1.c: Update warning location.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/pr39082-1.c


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

* [Bug middle-end/53088] [4.8 Regression] gcc.target/i386/pr39082-1.c
  2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2012-04-25 11:32 ` hubicka at gcc dot gnu.org
@ 2012-09-07 11:25 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-07 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-07 11:25:26 UTC ---
Fixed.


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

end of thread, other threads:[~2012-09-07 11:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23 17:00 [Bug middle-end/53088] New: [4.8 Regression] gcc.target/i386/pr39082-1.c hjl.tools at gmail dot com
2012-04-23 18:40 ` [Bug middle-end/53088] " hubicka at gcc dot gnu.org
2012-04-23 18:55 ` rguenth at gcc dot gnu.org
2012-04-24  8:23 ` rguenth at gcc dot gnu.org
2012-04-24 15:07 ` hubicka at gcc dot gnu.org
2012-04-24 15:13 ` hubicka at gcc dot gnu.org
2012-04-25 11:22 ` hubicka at gcc dot gnu.org
2012-04-25 11:32 ` hubicka at gcc dot gnu.org
2012-09-07 11:25 ` rguenth at gcc dot gnu.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).