public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
@ 2012-01-21 16:11 dominiq at lps dot ens.fr
  2012-01-21 16:16 ` [Bug target/51934] " mikpe at it dot uu.se
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-21 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51934
           Summary: FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess
                    errors) on powerpc*-*-*
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: ktietz@gcc.gnu.org, pthaugen@us.ibm.com
              Host: powerpc*-*-*
            Target: powerpc*-*-*
             Build: powerpc*-*-*


The test g++.dg/torture/pr51344.C fails on powerpc*-*-* (see
http://gcc.gnu.org/ml/gcc-testresults/2012-01/msg02019.html )

FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -O1  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -O2  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -O3 -fomit-frame-pointer  (test for excess
errors)
FAIL: g++.dg/torture/pr51344.C  -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -Os  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr51344.C  -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (test for excess errors)

with (at least on powerpc-apple-darwin9)

[karma] f90/bug% /opt/gcc/gcc4.7w/bin/g++ -c
/opt/gcc/work/gcc/testsuite/g++.dg/torture/pr51344.C
/opt/gcc/work/gcc/testsuite/g++.dg/torture/pr51344.C:7:58: warning: 'cdecl'
attribute directive ignored [-Wattributes]
/opt/gcc/work/gcc/testsuite/g++.dg/torture/pr51344.C:7:58: warning: 'cdecl'
attribute directive ignored [-Wattributes]

Is the attribute 'cdecl' supposed to exist on powerpc?


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
@ 2012-01-21 16:16 ` mikpe at it dot uu.se
  2012-01-21 17:32 ` dominiq at lps dot ens.fr
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-21 16:16 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-21 16:10:15 UTC ---
Also broken on 4.6 and 4.5 branches (don't know yet about 4.4, but the
offending change was backported to it too), see:

http://gcc.gnu.org/ml/gcc-testresults/2012-01/msg02026.html
http://gcc.gnu.org/ml/gcc-testresults/2012-01/msg01992.html
http://gcc.gnu.org/ml/gcc-testresults/2012-01/msg01945.html


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
  2012-01-21 16:16 ` [Bug target/51934] " mikpe at it dot uu.se
@ 2012-01-21 17:32 ` dominiq at lps dot ens.fr
  2012-01-21 21:31 ` mikpe at it dot uu.se
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-21 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-21 16:15:52 UTC ---
> Also broken on 4.6 and 4.5 branches ...

Mikael can you confirm that the failures are due to the warning "'cdecl'
attribute directive ignored"?


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
  2012-01-21 16:16 ` [Bug target/51934] " mikpe at it dot uu.se
  2012-01-21 17:32 ` dominiq at lps dot ens.fr
@ 2012-01-21 21:31 ` mikpe at it dot uu.se
  2012-01-21 22:32 ` dominiq at lps dot ens.fr
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-21 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-21 21:15:47 UTC ---
(In reply to comment #2)
> > Also broken on 4.6 and 4.5 branches ...
> 
> Mikael can you confirm that the failures are due to the warning "'cdecl'
> attribute directive ignored"?

Yes, the 4.6 failures are caused by that cdecl attribute ignored warning.

BTW, 4.6 fails on sparc64-linux in the same way.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2012-01-21 21:31 ` mikpe at it dot uu.se
@ 2012-01-21 22:32 ` dominiq at lps dot ens.fr
  2012-01-21 22:54 ` jakub at gcc dot gnu.org
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-21 22:32 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-21
     Ever Confirmed|0                           |1

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-21 22:22:50 UTC ---
> Yes, the 4.6 failures are caused by that cdecl attribute ignored warning.
>
> BTW, 4.6 fails on sparc64-linux in the same way.

Thanks, setting the PR to NEW.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2012-01-21 22:32 ` dominiq at lps dot ens.fr
@ 2012-01-21 22:54 ` jakub at gcc dot gnu.org
  2012-01-21 23:43 ` dominiq at lps dot ens.fr
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-21 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-21 22:35:58 UTC ---
The test just should use some attribute that is common to all targets, like
__attribute__((noinline)) or similar, unless it didn't fail with that attribute
before the fix.  If it didn't, then the test needs to be limited to targets
that support it.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2012-01-21 22:54 ` jakub at gcc dot gnu.org
@ 2012-01-21 23:43 ` dominiq at lps dot ens.fr
  2012-01-21 23:58 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-21 23:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-21 23:15:31 UTC ---
> The test just should use some attribute that is common to all targets, like
> __attribute__((noinline)) or similar, unless it didn't fail with that attribute
> before the fix.  If it didn't, then the test needs to be limited to targets
> that support it.

The attribute format seems to do the trick: it hangs on 4.6.2 and compiles with
recent trunk.

--- ../_clean/gcc/testsuite/g++.dg/torture/pr51344.C    2012-01-20
11:40:19.000000000 +0100
+++ gcc/testsuite/g++.dg/torture/pr51344.C    2012-01-22 00:13:16.000000000
+0100
@@ -4,7 +4,7 @@ class A;
 template <class T>
 class B
 {
-  friend __attribute__((cdecl)) A& operator >>(A& a, B& b)
+  friend __attribute__((format)) A& operator >>(A& a, B& b)
   {
     return a;
   }


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2012-01-21 23:43 ` dominiq at lps dot ens.fr
@ 2012-01-21 23:58 ` jakub at gcc dot gnu.org
  2012-01-22  0:54 ` dominiq at lps dot ens.fr
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-21 23:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-21 23:30:25 UTC ---
You mean errors out?  format attribute must have 3 arguments.
Try leaf, or nothrow etc. attributes instead, format is a bad idea for a method
that isn't printf/scanf like.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2012-01-21 23:58 ` jakub at gcc dot gnu.org
@ 2012-01-22  0:54 ` dominiq at lps dot ens.fr
  2012-01-23 12:52 ` dominiq at lps dot ens.fr
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-22  0:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-21 23:58:19 UTC ---
> You mean errors out?  format attribute must have 3 arguments.
> Try leaf, or nothrow etc. attributes instead, format is a bad idea for a method
> that isn't printf/scanf like.

Well, format was the first attribute I have found with your requirements:
common to all platforms, hangs before the commit and passes after it (aligned,
cold, flatten, malloc, noclone, noinline,  nothrow, pure don't work; ifunc ,
no_instrument_function, noreturn, no_split_stack give warnings or errors).
nonnull meets also the above criteria, but is also supposed to use arguments.
If someone has more patience than me, be my guest!

Now if its use without arguments should yields an error, it is another bug.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors) on powerpc*-*-*
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2012-01-22  0:54 ` dominiq at lps dot ens.fr
@ 2012-01-23 12:52 ` dominiq at lps dot ens.fr
  2012-01-23 12:55 ` [Bug target/51934] FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) due to "cdecl attribute ignored" warning dominiq at lps dot ens.fr
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Greta.Yorsh at arm dot com

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 12:36:59 UTC ---
*** Bug 51963 has been marked as a duplicate of this bug. ***


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2012-01-23 12:52 ` dominiq at lps dot ens.fr
@ 2012-01-23 12:55 ` dominiq at lps dot ens.fr
  2012-01-23 14:55 ` jason at gcc dot gnu.org
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|powerpc*-*-*                |powerpc*-*-* arm-none-eabi
            Summary|FAIL:                       |FAIL:
                   |g++.dg/torture/pr51344.C    |g++.dg/torture/pr51344.C
                   |-O0  (test for excess       |-O0  (test for excess
                   |errors) on powerpc*-*-*     |errors)  due to "cdecl
                   |                            |attribute ignored" warning

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 12:40:36 UTC ---
Changed the summary.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (9 preceding siblings ...)
  2012-01-23 12:55 ` [Bug target/51934] FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) due to "cdecl attribute ignored" warning dominiq at lps dot ens.fr
@ 2012-01-23 14:55 ` jason at gcc dot gnu.org
  2012-01-23 14:58 ` jason at gcc dot gnu.org
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-23 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-23 14:43:30 UTC ---
Author: jason
Date: Mon Jan 23 14:43:25 2012
New Revision: 183434

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183434
Log:
    PR target/51934
    * g++.dg/torture/pr51344.C: Use noreturn instead of cdecl.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/torture/pr51344.C


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (10 preceding siblings ...)
  2012-01-23 14:55 ` jason at gcc dot gnu.org
@ 2012-01-23 14:58 ` jason at gcc dot gnu.org
  2012-01-23 15:06 ` dominiq at lps dot ens.fr
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-23 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-23 14:50:00 UTC ---
Should be fixed now.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (11 preceding siblings ...)
  2012-01-23 14:58 ` jason at gcc dot gnu.org
@ 2012-01-23 15:06 ` dominiq at lps dot ens.fr
  2012-01-23 15:20 ` jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 14:55:08 UTC ---
> Log:
>     PR target/51934
>     * g++.dg/torture/pr51344.C: Use noreturn instead of cdecl.
>
> Should be fixed now.

The use of 'noreturn' yields a warning with g++ 4.6.2 and not an infinite loop:

[macbook] f90/bug% time g++-fsf-4.6 -c pr51344_db.C
pr51344_db.C: In function 'A& operator>>(A&, B<T>&)':
pr51344_db.C:9:12: warning: function declared 'noreturn' has a 'return'
statement [enabled by default]
0.012u 0.024s 0:00.93 3.2%    0+0k 3+13io 0pf+0w

so IMO the test is no longer testing what has been fixed (see comment #8 for a
list of what I have tried).


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (12 preceding siblings ...)
  2012-01-23 15:06 ` dominiq at lps dot ens.fr
@ 2012-01-23 15:20 ` jakub at gcc dot gnu.org
  2012-01-23 15:27 ` dominiq at lps dot ens.fr
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-23 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-23 15:10:42 UTC ---
Well, if it hangs before the fix with the noreturn attribute, then it is
trivial to replace the return a; with for (;;);


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (13 preceding siblings ...)
  2012-01-23 15:20 ` jakub at gcc dot gnu.org
@ 2012-01-23 15:27 ` dominiq at lps dot ens.fr
  2012-01-23 15:51 ` jason at gcc dot gnu.org
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 15:19:37 UTC ---
> Well, if it hangs before the fix with the noreturn attribute, then it is
> trivial to replace the return a; with for (;;);

It does not hang:

macbook] f90/bug% cat pr51344_db.C
/* { dg-do compile } */
class A;

template <class T>
class B
{
  friend __attribute__((noreturn)) A& operator >>(A& a, B& b)
  {
    for (;;);
    /* return a; */
  }
};
[macbook] f90/bug% time g++-fsf-4.6 -c pr51344_db.C
0.010u 0.015s 0:00.05 40.0%    0+0k 0+4io 0pf+0w

while

[macbook] f90/bug% cat pr51344_db.C
/* { dg-do compile } */
class A;

template <class T>
class B
{
  friend __attribute__((format)) A& operator >>(A& a, B& b)
  {
    for (;;);
    /* return a; */
  }
};
macbook] f90/bug% time g++-fsf-4.6 -c pr51344_db.C
^C0.002u 0.005s 0:37.44 0.0%    0+0k 0+1io 0pf+0w

^
| interrupted


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (14 preceding siblings ...)
  2012-01-23 15:27 ` dominiq at lps dot ens.fr
@ 2012-01-23 15:51 ` jason at gcc dot gnu.org
  2012-01-23 16:09 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-23 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-23 15:30:58 UTC ---
Author: jason
Date: Mon Jan 23 15:30:48 2012
New Revision: 183436

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183436
Log:
    PR target/51934
    * g++.dg/torture/pr51344.C: Limit to x86.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/torture/pr51344.C


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (15 preceding siblings ...)
  2012-01-23 15:51 ` jason at gcc dot gnu.org
@ 2012-01-23 16:09 ` dominiq at lps dot ens.fr
  2012-01-23 16:36 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 16:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 15:50:16 UTC ---
> g++.dg/torture/pr51344.C: Limit to x86.

Note that using 'format' instead of 'cdecl' hangs also on
powerpc-apple-darwin9:

[karma] f90/bug% time g++-fsf-4.6 pr51344_db.C
^C0.002u 0.006s 1:35.05 0.0%    0+0k 2+7io 46pf+0w
 ^
 | interrupted
[karma] f90/bug% time /opt/gcc/gcc4.7w/bin/g++ -c pr51344_db.C
0.036u 0.071s 0:01.50 6.6%    0+0k 16+10io 792pf+0w
[karma] f90/bug% /opt/gcc/gcc4.7w/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/gcc4.7w/bin/g++
COLLECT_LTO_WRAPPER=/opt/gcc/gcc4.7w/libexec/gcc/powerpc-apple-darwin9.8.0/4.7.0/lto-wrapper
Target: powerpc-apple-darwin9.8.0
Configured with: ../work/configure --prefix=/opt/gcc/gcc4.7w
--enable-languages=c,c++,fortran,objc,obj-c++,java,ada,lto --with-gmp=/opt/mp
--with-system-zlib --with-cloog=/opt/mp --enable-lto --enable-cloog-backend=isl
Thread model: posix
gcc version 4.7.0 20120121 (experimental) [trunk revision 183381p3] (GCC) 

If 'format' is invalid in this context, g++ should probably emit an error
instead of hanging.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (16 preceding siblings ...)
  2012-01-23 16:09 ` dominiq at lps dot ens.fr
@ 2012-01-23 16:36 ` jakub at gcc dot gnu.org
  2012-01-23 22:47 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-23 16:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-23 15:58:01 UTC ---
I bet you'd have to instantiate the template to see the errors.
Nevertheless, it would be a bad idea to add __attribute__((format)) to the
testcase and expect that we don't error on that, perhaps one day we'd error on
it even when not instantiated.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (17 preceding siblings ...)
  2012-01-23 16:36 ` jakub at gcc dot gnu.org
@ 2012-01-23 22:47 ` dominiq at lps dot ens.fr
  2012-01-24  6:06 ` jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 22:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-01-23 22:05:44 UTC ---
> g++.dg/torture/pr51344.C: Limit to x86.
>
> -/* { dg-do compile } */
> +/* { dg-do compile { target { i?86-*-* && ilp32 } } } */

Any reason to limit the test to i?86 and 32 bit mode? Why not on x86_64 and 64
bit mode?
Is it related to the failures seen at
http://gcc.gnu.org/ml/gcc-testresults/2012-01/msg02281.html for instance?

The test passes for both -m32 and -m64 on x86_64-apple-darwin10 with

/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (18 preceding siblings ...)
  2012-01-23 22:47 ` dominiq at lps dot ens.fr
@ 2012-01-24  6:06 ` jason at gcc dot gnu.org
  2012-01-25 15:16 ` danglin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-24  6:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-24 02:45:28 UTC ---
cdecl only applies to the 32-bit ABI.  ix86_handle_cconv_attribute normally
warns about using it in 64-bit mode, I wonder why it doesn't on darwin?


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (19 preceding siblings ...)
  2012-01-24  6:06 ` jason at gcc dot gnu.org
@ 2012-01-25 15:16 ` danglin at gcc dot gnu.org
  2012-01-25 17:24 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-01-25 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #21 from John David Anglin <danglin at gcc dot gnu.org> 2012-01-25 14:57:39 UTC ---
Patch also needs to be applied to 4.6 branch.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (20 preceding siblings ...)
  2012-01-25 15:16 ` danglin at gcc dot gnu.org
@ 2012-01-25 17:24 ` jason at gcc dot gnu.org
  2012-01-25 19:27 ` danglin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-25 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-25 16:33:56 UTC ---
Author: jason
Date: Wed Jan 25 16:33:50 2012
New Revision: 183526

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183526
Log:
    PR target/51934
    * g++.dg/torture/pr51344.C: Limit to x86.

Modified:
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/torture/pr51344.C


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (21 preceding siblings ...)
  2012-01-25 17:24 ` jason at gcc dot gnu.org
@ 2012-01-25 19:27 ` danglin at gcc dot gnu.org
  2012-03-06  8:28 ` jakub at gcc dot gnu.org
  2012-03-06  8:31 ` jakub at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-01-25 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

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

--- Comment #23 from John David Anglin <danglin at gcc dot gnu.org> 2012-01-25 19:08:41 UTC ---
Resolved.


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (22 preceding siblings ...)
  2012-01-25 19:27 ` danglin at gcc dot gnu.org
@ 2012-03-06  8:28 ` jakub at gcc dot gnu.org
  2012-03-06  8:31 ` jakub at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-06  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-06 08:26:03 UTC ---
Author: jakub
Date: Tue Mar  6 08:25:51 2012
New Revision: 184976

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184976
Log:
    Backported from 4.6 branch
    2012-01-25  Jason Merrill  <jason@redhat.com>

    PR target/51934
    * g++.dg/torture/pr51344.C: Limit to x86.

Modified:
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/torture/pr51344.C


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

* [Bug target/51934] FAIL: g++.dg/torture/pr51344.C  -O0  (test for excess errors)  due to "cdecl attribute ignored" warning
  2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
                   ` (23 preceding siblings ...)
  2012-03-06  8:28 ` jakub at gcc dot gnu.org
@ 2012-03-06  8:31 ` jakub at gcc dot gnu.org
  24 siblings, 0 replies; 26+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-06  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-06 08:26:32 UTC ---
Author: jakub
Date: Tue Mar  6 08:26:22 2012
New Revision: 184977

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184977
Log:
    Backported from 4.6 branch
    2012-01-25  Jason Merrill  <jason@redhat.com>

    PR target/51934
    * g++.dg/torture/pr51344.C: Limit to x86.

Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr51344.C


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

end of thread, other threads:[~2012-03-06  8:31 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 16:11 [Bug target/51934] New: FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) on powerpc*-*-* dominiq at lps dot ens.fr
2012-01-21 16:16 ` [Bug target/51934] " mikpe at it dot uu.se
2012-01-21 17:32 ` dominiq at lps dot ens.fr
2012-01-21 21:31 ` mikpe at it dot uu.se
2012-01-21 22:32 ` dominiq at lps dot ens.fr
2012-01-21 22:54 ` jakub at gcc dot gnu.org
2012-01-21 23:43 ` dominiq at lps dot ens.fr
2012-01-21 23:58 ` jakub at gcc dot gnu.org
2012-01-22  0:54 ` dominiq at lps dot ens.fr
2012-01-23 12:52 ` dominiq at lps dot ens.fr
2012-01-23 12:55 ` [Bug target/51934] FAIL: g++.dg/torture/pr51344.C -O0 (test for excess errors) due to "cdecl attribute ignored" warning dominiq at lps dot ens.fr
2012-01-23 14:55 ` jason at gcc dot gnu.org
2012-01-23 14:58 ` jason at gcc dot gnu.org
2012-01-23 15:06 ` dominiq at lps dot ens.fr
2012-01-23 15:20 ` jakub at gcc dot gnu.org
2012-01-23 15:27 ` dominiq at lps dot ens.fr
2012-01-23 15:51 ` jason at gcc dot gnu.org
2012-01-23 16:09 ` dominiq at lps dot ens.fr
2012-01-23 16:36 ` jakub at gcc dot gnu.org
2012-01-23 22:47 ` dominiq at lps dot ens.fr
2012-01-24  6:06 ` jason at gcc dot gnu.org
2012-01-25 15:16 ` danglin at gcc dot gnu.org
2012-01-25 17:24 ` jason at gcc dot gnu.org
2012-01-25 19:27 ` danglin at gcc dot gnu.org
2012-03-06  8:28 ` jakub at gcc dot gnu.org
2012-03-06  8:31 ` jakub 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).