[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2011-01-09 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #10 from Dominique d'Humieres  
2011-01-09 13:02:32 UTC ---
Closing as fixed, thanks for the patch.


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2011-01-09 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #9 from Iain Sandoe  2011-01-09 12:41:37 
UTC ---
Author: iains
Date: Sun Jan  9 12:41:33 2011
New Revision: 168611

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168611
Log:

PR gcc/46902
PR testsuite/46912
* plugin.c: Move include of dlfcn.h from here...
* system.h: ... to here.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/plugin.c
trunk/gcc/system.h


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2011-01-03 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #8 from Iain Sandoe  2011-01-03 21:54:37 
UTC ---
(In reply to comment #7)
> (In reply to comment #5)
> > On Dec 16, 2010, at 2:06 PM, iains at gcc dot gnu.org wrote:
> > > gcc/system.h :
> > 
> > > # define bool unsigned char
> > 
> > This is wrong.  The solution is simple:
> > 
> >   #define bool _Bool
> > 
> > on darwin.  Arguably, this is correct for every non-broken system as well.
> 
> We can't rely on GCC or C99 support.  The correct fix is to define
> bool to unsigned int for darwin then (and pay the space efficience loss
> price).

it is fixed by
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01361.html
which either needs a global reviewer, or declaring to be obvious
 (Mike Stump reviewed at
http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01425.html)


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2011-01-03 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #7 from Richard Guenther  2011-01-03 
20:59:41 UTC ---
(In reply to comment #5)
> On Dec 16, 2010, at 2:06 PM, iains at gcc dot gnu.org wrote:
> > gcc/system.h :
> 
> > # define bool unsigned char
> 
> This is wrong.  The solution is simple:
> 
>   #define bool _Bool
> 
> on darwin.  Arguably, this is correct for every non-broken system as well.

We can't rely on GCC or C99 support.  The correct fix is to define
bool to unsigned int for darwin then (and pay the space efficience loss
price).

Richard.


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2011-01-03 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2010-12-16 Thread mikestump at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #5 from Mike Stump  2010-12-16 
22:42:34 UTC ---
On Dec 16, 2010, at 2:06 PM, iains at gcc dot gnu.org wrote:
> gcc/system.h :

> # define bool unsigned char

This is wrong.  The solution is simple:

  #define bool _Bool

on darwin.  Arguably, this is correct for every non-broken system as well.


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2010-12-16 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #4 from Iain Sandoe  2010-12-16 22:05:55 
UTC ---
(In reply to comment #3)
> > it's all fall-out from the different assumed sizes of Bool (see also 46902).
> 
> ?  bool/_Bool is 4 on pcc.  Making it any other size introduces a abi bug. 
> What code assumes _Bool is 1 byte?  That would be the root cause that needs
> fixing.

Hm. I'm not sure where to go from here .. this touches everything.

gcc/system.h :

/* Provide a fake boolean type.  We make no attempt to use the
   C99 _Bool, as it may not be available in the bootstrap compiler,
   and even if it is, it is liable to be buggy.
   This must be after all inclusion of system headers, as some of
   them will mess us up.  */

#undef TRUE
#undef FALSE

#ifdef __cplusplus
  /* Obsolete.  */
# define TRUE true
# define FALSE false
#else /* !__cplusplus */
# undef bool
# undef true
# undef false

# define bool unsigned char
# define true 1
# define false 0

  /* Obsolete.  */
# define TRUE true
# define FALSE false
#endif /* !__cplusplus */


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2010-12-16 Thread mikestump at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

--- Comment #3 from Mike Stump  2010-12-16 
21:59:44 UTC ---
> it's all fall-out from the different assumed sizes of Bool (see also 46902).

?  bool/_Bool is 4 on pcc.  Making it any other size introduces a abi bug. 
What code assumes _Bool is 1 byte?  That would be the root cause that needs
fixing.


> I think (subject to Mike's agreement) that, since Darwin's  does 
> not
> set bool to int for GCC > 3

You're misreading it:

$ cat  t.c
int sz = sizeof(_Bool);
$ gcc -arch ppc t.c -S -o -
.machine ppc7400
_sz:
.long4

> .. that we should default to one byte bools on PPC darwin (there is no effect 
> on x86).

No, that would be bad.


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2010-12-14 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

Iain Sandoe  changed:

   What|Removed |Added

 CC||mrs at gcc dot gnu.org

--- Comment #2 from Iain Sandoe  2010-12-14 21:45:13 
UTC ---
it's all fall-out from the different assumed sizes of Bool (see also 46902).

I think (subject to Mike's agreement) that, since Darwin's  does not
set bool to int for GCC > 3 ... that we should default to one byte bools on PPC
darwin (there is no effect on x86).

Index: gcc/config/darwin.opt
===
--- gcc/config/darwin.opt   (revision 167812)
+++ gcc/config/darwin.opt   (working copy)
@@ -166,7 +166,7 @@ Target Joined Report Var(darwin_macosx_version_min
 The earliest MacOS X version on which this program will run

 mone-byte-bool
-Target RejectNegative Report Var(darwin_one_byte_bool)
+Target RejectNegative Report Var(darwin_one_byte_bool) Init(1)
 Set sizeof(bool) to 1

 fapple-kext


[Bug testsuite/46912] [4.6 Regression] Test failures for g++.dg/plugin/*plugin*.C on powerpc-apple-darwin9

2010-12-13 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46912

Iain Sandoe  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2010.12.13 08:25:45
 Ever Confirmed|0   |1

--- Comment #1 from Iain Sandoe  2010-12-13 08:25:45 
UTC ---

this problem is revealed by my commit of:
http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00188.html

However, it is _not_ caused by it 
(the plugins were not being built before owing to the clash between
-mdynamic-no-pic and -fPIC).

The problem in the failing test-cases is that the plugin (which built without
flagging faults) does not load.

The plugin does not load because it fails to resolve symbols (IIRC, they are
related to the warning subsystem).

Another oddity is that (last time I tried) the faults do not manifest when the
compiler is bootstrapped with cxx -- implying that the issue might be related
to name mangling or headers.