[Bug other/33426] Support of #pragma ivdep

2011-07-17 Thread vincenzo.innocente at cern dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33426

vincenzo Innocente  changed:

   What|Removed |Added

 CC||vincenzo.innocente at cern
   ||dot ch

--- Comment #12 from vincenzo Innocente  
2011-07-17 05:39:12 UTC ---
any news on this?
I reached 
" disable versioning for alias - max number of generated checks exceeded."
because of PR49761 and really need to tell GCC to vectorize ignoring possibly
dependencies


[Bug middle-end/35700] Problems compiling applications with -pg option using gcc 3.4.4 compiler.

2011-07-17 Thread savisko at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35700

Michael Savisko  changed:

   What|Removed |Added

 CC||savisko at yahoo dot com

--- Comment #5 from Michael Savisko  2011-07-17 
08:31:41 UTC ---
I'm using WindRiver compiler based on gcc version 3.4.4 and I have the same
compilation problem.
However, from my observation the problem occurs because of -O1 compilation key.
When change this to -O0 (or without optimization option at all) the problem
disappears.
Here's my compilation's command line:
/raven/Tools/pkgs/WindRiver/1.4/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin/i586-wrs-linux-gnu-i686p4-glibc_cgl-g++
-DMPC_WR14_COMPILATION -DBBND_TARGET_STRING=\"PMP-CE3100\" -c -MD -ggdb
-march=i686 -mtune=i686 -m32 -D_GNU_SOURCE -D_THREAD_SAFE -D_REENTRANT
-D__USE_STRING_INLINES -O1 -feliminate-unused-debug-types
-fno-keep-static-consts -fmerge-constants -fno-omit-frame-pointer -fno-builtin
-fno-defer-pop -fthread-jumps -fif-conversion -fif-conversion2
-fvisibility-inlines-hidden -fregmove -Wall -Wextra -Winit-self -Wcast-align
-Wfloat-equal -Wpointer-arith -Wsign-compare -Werror -Wformat=2 -Wswitch-enum
-Wendif-labels -Wno-missing-format-attribute -Wnon-virtual-dtor
-Wlarger-than-8388608


[Bug middle-end/35700] Problems compiling applications with -pg option using gcc 3.4.4 compiler.

2011-07-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35700

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ebotcazou at gcc dot
   ||gnu.org
 Resolution||WONTFIX

--- Comment #6 from Eric Botcazou  2011-07-17 
08:58:21 UTC ---
Problems in WindRiver compilers must be reported to WindRiver.


[Bug target/49764] [gcc-avr] Compiling for Arduino is not working

2011-07-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764

--- Comment #12 from Jonathan Wakely  2011-07-17 
09:54:56 UTC ---
I see on the arduino forum that you've figured out how to run the compiler
outside the IDE

Now you can add -E to the end of the command, and attach the output file to
this bug report, along with the complete command you used to produce it

That will be most of the information needed for someone to look at this bug
report properly


[Bug target/49764] [gcc-avr] Compiling for Arduino is not working

2011-07-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764

--- Comment #13 from Jonathan Wakely  2011-07-17 
09:57:25 UTC ---
Oops, ignore that - I didn't see your last reply here where you've already
confirmed the command and the minimal testcase that produces the error. Thanks
for providing that.


[Bug target/49764] [gcc-avr] Compiling for Arduino is not working

2011-07-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764

Jonathan Wakely  changed:

   What|Removed |Added

 Target||avr
 Status|WAITING |NEW
 CC||eric.weddington at atmel
   ||dot com
   Severity|critical|normal

--- Comment #14 from Jonathan Wakely  2011-07-17 
10:02:39 UTC ---
CC'ing an avr maintainer, Eric could you take a look please?

avr-g++ 4.6.1 rejects this declaration in the arduino headers:

extern const int __attribute__((progmem)) p[];


[Bug ada/48835] Porting GNAT to GNU/Linux/m68k

2011-07-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835

--- Comment #27 from Mikael Pettersson  2011-07-17 
10:18:25 UTC ---
(In reply to comment #26)
> Could this be related to that bug?
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633754

I can't say for sure, but the symptoms aren't identical.  stage2 gnat1 always
SEGVs in the same way, but SP is below accessible memory, PC is way high in
nowhere land and odd (which isn't allowed), and gdb cannot generate a symbolic
stack trace.  stage1 gnat1 does work however, which makes me suspect a
miscompilation.  I may have to try a bisection.


[Bug c/49768] New: C99 style union initializations does not work as expected with optimizations

2011-07-17 Thread vrahkone at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

   Summary: C99 style union initializations does not work as
expected with optimizations
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vrahk...@gmail.com


Created attachment 24779
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24779
Test code that fails with 4.6.1 and works with 4.5.3

It seems that union cannot be initialized with C99 style with 4.6.1. Attached
example code works with GCC 4.5.3 but fails on assert when compiled with GCC
4.6.1. The GCC 4.6.1 seems to generate only the assert failure i.e. example
compiled with -O3:

00400500 :
  400500:   48 83 ec 08 sub$0x8,%rsp
  400504:   b9 2b 06 40 00  mov$0x40062b,%ecx
  400509:   ba 18 00 00 00  mov$0x18,%edx
  40050e:   be 0c 06 40 00  mov$0x40060c,%esi
  400513:   bf 13 06 40 00  mov$0x400613,%edi
  400518:   e8 cb fe ff ff  callq  4003e8 <__assert_fail@plt>
  40051d:   90  nop
  40051e:   90  nop
  40051f:   90  nop

It seems that using -fno-tree-pre, -fno-tree-ccp and -fno-tree-fre with -O3 the
code seems to work. Also setting the first bit in initialization seems to
generate working code i.e. rest of initialization works if it's set and also
setting the bits later seems to work too.

ps. I'm not totally sure that if this is a regression or meant to be that way
because the C-standard is not clear on this matter but following code works
with GCC 4.5.3 and the assert fails with GCC 4.6.1.


[Bug c++/46043] attribute to mark virtual methods that can't be further overriden so they can be devirtualized

2011-07-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46043

--- Comment #7 from Paolo Carlini  2011-07-17 
11:45:53 UTC ---
Or we can mark it as duplicate of c++/49488... or viceversa.


[Bug c/49769] New: Configuration mismatch -- extra parts

2011-07-17 Thread michael.a.richmond at nasa dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49769

   Summary: Configuration mismatch -- extra parts
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: michael.a.richm...@nasa.gov
  Host: sparc-unknown-linux-gnu
Target: sparc-unknown-linux-gnu
 Build: sparc-unknown-linux-gnu


When I attempt to build the July 16 snapshot of gcc 4.7 on a Sparc system
running Debian Linux 6.0 I get the following messages:

g -O2 -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector   -I. -I. -I../.././gcc
-I/home/mrichmon/gcc-4.7-20110716/libgcc
-I/home/mrichmon/gcc-4.7-20110716/libgcc/.
-I/home/mrichmon/gcc-4.7-20110716/libgcc/../gcc
-I/home/mrichmon/gcc-4.7-20110716/libgcc/../include  -DHAVE_CC_TLS  -o
crtfastmath.o -MT crtfastmath.o -MD -MP -MF crtfastmath.dep
-frandom-seed=gcc-crtfastmath -c
/home/mrichmon/gcc-4.7-20110716/libgcc/config/sparc/crtfastmath.c
# If the gcc directory specifies which extra parts to
# build for this target, and the libgcc configuration also
# specifies, make sure they match.  This can be removed
# when the gcc directory no longer holds libgcc configuration;
# it is useful when migrating a target.
Configuration mismatch!
Extra parts from gcc directory: crtbegin.o crtbeginS.o crtbeginT.o crtend.o
crtendS.o
Extra parts from libgcc: crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o
crtfastmath.o
exit 1
make[3]: *** [libgcc-extra-parts] Error 1
make[3]: Leaving directory
`/home/mrichmon/gcc-4.7-20110716/g95/sparc-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/mrichmon/gcc-4.7-20110716/g95'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mrichmon/gcc-4.7-20110716/g95'
make: *** [all] Error 2
Error running make


[Bug fortran/34657] program-unit MY_SUB imports symbol MY_SUB

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34657

Tobias Burnus  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus  2011-07-17 
11:54:40 UTC ---
Draft patch:

--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -4278,6 +4278,13 @@ check_for_ambiguous (gfc_symbol *st_sym, pointer_info
*info)
   module_locus locus;
   symbol_attribute attr;

+  if (st_sym->ns->proc_name && st_sym->name == st_sym->ns->proc_name->name)
+{
+  gfc_error ("'%s' of module '%s' imported at %C is also the name of the "
+"current program unit", st_sym->name, module_name);
+  return true;
+}
+
   rsym = info->u.rsym.sym;
   if (st_sym == rsym)
 return false;


[Bug c/49768] C99 style union initializations does not work as expected with optimizations

2011-07-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

--- Comment #1 from Mikael Pettersson  2011-07-17 
12:47:17 UTC ---
Created attachment 24780
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24780
reduced test case

This reduced test case doesn't use any union, just a struct with two one-bit
fields, and fails at -O1 and above with 4.6 and 4.7 on i686-linux.  Looking at
the generated code, gcc has removed all runtime checks and just inserted a call
to abort.

/* pr49768.c */

int main(void)
{
static struct {
unsigned int :1;
unsigned int test_bit2:1;
} test = {
.test_bit2 = 1,
};

if (test.test_bit2 != 1)
__builtin_abort();

return 0;
}


[Bug c/49769] Configuration mismatch -- extra parts

2011-07-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49769

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #1 from Mikael Pettersson  2011-07-17 
12:49:59 UTC ---
I get the exact same failure with gcc-4.7-20110716 on sparc64-linux.  The
previous snapshot, 4.7-20110709, did not have this problem.


[Bug c++/48934] no rejection reason given for SFINAE

2011-07-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0

--- Comment #17 from Jason Merrill  2011-07-17 
12:57:26 UTC ---
Fixed for 4.7.


[Bug c++/49488] [C++0x] Use 'final' for devirtualization purposes

2011-07-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49488

Jason Merrill  changed:

   What|Removed |Added

 CC||zsojka at seznam dot cz

--- Comment #4 from Jason Merrill  2011-07-17 
13:11:39 UTC ---
*** Bug 46043 has been marked as a duplicate of this bug. ***


[Bug c++/46043] attribute to mark virtual methods that can't be further overriden so they can be devirtualized

2011-07-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46043

Jason Merrill  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||DUPLICATE

--- Comment #8 from Jason Merrill  2011-07-17 
13:11:39 UTC ---
Sure, that makes sense.

*** This bug has been marked as a duplicate of bug 49488 ***


[Bug fortran/49624] ICE with pointer-bound remapping

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49624

--- Comment #2 from Tobias Burnus  2011-07-17 
14:52:50 UTC ---
Author: burnus
Date: Sun Jul 17 14:52:46 2011
New Revision: 176370

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176370
Log:
2011-07-17  Tobias Burnus  

PR fortran/49624
* expr.c (gfc_check_pointer_assign): Fix checking for invalid
pointer bounds.

2011-07-17  Tobias Burnus  

PR fortran/49624
* gfortran.dg/pointer_remapping_7.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/pointer_remapping_7.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/expr.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/49624] ICE with pointer-bound remapping

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49624

Tobias Burnus  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #3 from Tobias Burnus  2011-07-17 
14:57:47 UTC ---
FIXED on the 4.7 trunk.


[Bug middle-end/49732] [4.6/4.7 regression] crash on terminal_interface-curses-menus.adb from ncurses with -gnato

2011-07-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49732

--- Comment #10 from Eric Botcazou  2011-07-17 
15:06:39 UTC ---
Author: ebotcazou
Date: Sun Jul 17 15:06:36 2011
New Revision: 176371

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176371
Log:
PR middle-end/49732
* tree.c (walk_tree_1) : Do not walk a pointed-to type.

Added:
trunk/gcc/testsuite/gnat.dg/pointer_controlled.adb
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c


[Bug middle-end/49732] [4.6/4.7 regression] crash on terminal_interface-curses-menus.adb from ncurses with -gnato

2011-07-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49732

--- Comment #11 from Eric Botcazou  2011-07-17 
15:08:46 UTC ---
Author: ebotcazou
Date: Sun Jul 17 15:08:44 2011
New Revision: 176372

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176372
Log:
PR middle-end/49732
* tree.c (walk_tree_1) : Do not walk a pointed-to type.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gnat.dg/pointer_controlled.adb
  - copied unchanged from r176371,
trunk/gcc/testsuite/gnat.dg/pointer_controlled.adb
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree.c


[Bug middle-end/49732] [4.6/4.7 regression] crash on terminal_interface-curses-menus.adb from ncurses with -gnato

2011-07-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49732

Eric Botcazou  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #12 from Eric Botcazou  2011-07-17 
15:11:18 UTC ---
Thanks for reporting the problem.


[Bug fortran/34657] program-unit MY_SUB imports symbol MY_SUB

2011-07-17 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34657

--- Comment #3 from Thomas Koenig  2011-07-17 
15:24:02 UTC ---
(In reply to comment #2)

The patch causes two "regressions".

The first one, in interface_3.f90, triggers because the error message
from this patch takes precedence over the "ambiguous" error message
before. This should be fine with changing the error message in the
test case.

The second one, in generic_17.f90, is simply an incorrect test case,
which is very much like the one from the test case.

For the test case for this PR, please also add a test case like

module test_mod
interface
  subroutine my_sub (a)
real a
  end subroutine
end interface
end module

subroutine my_sub (a)
  use test_mod, gugu => my_sub
  real a
  print *, a
end subroutine

END

(which is OK, and which passes for your patch).


[Bug bootstrap/49769] [4.7 regression] configuration mismatch -- extra parts

2011-07-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49769

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.17 15:42:38
  Component|c   |bootstrap
 CC||ebotcazou at gcc dot
   ||gnu.org, ro at gcc dot
   ||gnu.org
 Ever Confirmed|0   |1
Summary|Configuration mismatch --   |[4.7 regression]
   |extra parts |configuration mismatch --
   ||extra parts
   Target Milestone|--- |4.7.0

--- Comment #2 from Eric Botcazou  2011-07-17 
15:42:38 UTC ---
Adding Rainer.


[Bug c++/48934] no rejection reason given for SFINAE

2011-07-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48934

--- Comment #18 from Jonathan Wakely  2011-07-17 
16:37:48 UTC ---
this is fantastic - thanks!


[Bug middle-end/49545] [4.7 Regression] New C++ test failures

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49545

John David Anglin  changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu.org

--- Comment #8 from John David Anglin  2011-07-17 
16:48:34 UTC ---
I'm also seeing it on hppa64-hp-hpux11.11.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #10 from Uros Bizjak  2011-07-17 17:26:15 
UTC ---
Compiling with current mainline, I got:

pr47744.c:5:1: internal compiler error: in create_mem_ref, at
tree-ssa-address.c:806
Please submit a full bug report,

for all three examples here.

Apparently, current mainline does not survive tree passes yet ...


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #11 from Uros Bizjak  2011-07-17 17:26:58 
UTC ---
(In reply to comment #10)

> Apparently, current mainline does not survive tree passes yet ...

gcc version 4.7.0 20110717 (experimental) [trunk revision 176373] (GCC)


[Bug c/49768] C99 style union initializations does not work as expected with optimizations

2011-07-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

Mikael Pettersson  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org,
   ||mikpe at it dot uu.se

--- Comment #2 from Mikael Pettersson  2011-07-17 
18:22:21 UTC ---
It started with r164688:

Author: hubicka
Date: Tue Sep 28 16:28:39 2010
New Revision: 164688

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164688
Log:
* tree-ssa-ccp.c (fold_ctor_reference): New function.
(fold_const_aggregate_ref): Use it.
* fold-const.c (canonicalize_constructor_val): Check that we don't fold
into external static.

The dumps from r164687 and r164688 start to differ in pr49768.c.061t.ccp2, when
r164688 removes the runtime check and the static object, and makes the abort()
call unconditional.

Removing the unused initial padding bit field unbreaks the test case.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #12 from H.J. Lu  2011-07-17 18:28:57 
UTC ---
(In reply to comment #11)
> (In reply to comment #10)
> 
> > Apparently, current mainline does not survive tree passes yet ...
> 
> gcc version 4.7.0 20110717 (experimental) [trunk revision 176373] (GCC)

There are quite a few changes still waiting to be merged from
x32 branch.  I have broken them into smaller pieces for easy
review.  I will try to submit all of them next week.

BTW, I have been keeping x32 branch very much up to date.


[Bug other/49767] __mulsc3 runs into infinite recursion if GCC is compiled with -O0 option

2011-07-17 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49767

--- Comment #1 from Mikael Pettersson  2011-07-17 
19:44:53 UTC ---
I can reproduce this with gcc-4.3.2 on i686-linux / FC13, however 4.3.3 and
newer appear to be fixed.

Please note that upstream support for gcc-4.3.x has ended.


[Bug fortran/34657] program-unit MY_SUB imports symbol MY_SUB

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34657

--- Comment #4 from Tobias Burnus  2011-07-17 
19:57:13 UTC ---
Author: burnus
Date: Sun Jul 17 19:57:10 2011
New Revision: 176375

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176375
Log:
2011-07-17  Tobias Burnus  

PR fortran/34657
* module.c (check_for_ambiguous): Check whether the name is
* matches
the current program unit.

2011-07-17  Tobias Burnus  
Thomas Koenig  

PR fortran/34657
* gfortran.dg/generic_17.f90: Fix testcase.
* gfortran.dg/interface_3.f90: Add dg-error.
* gfortran.dg/use_14.f90: New.
* gfortran.dg/use_15.f90: New.


Added:
trunk/gcc/testsuite/gfortran.dg/use_14.f90
trunk/gcc/testsuite/gfortran.dg/use_15.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/module.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/generic_17.f90
trunk/gcc/testsuite/gfortran.dg/interface_3.f90


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #13 from Uros Bizjak  2011-07-17 20:02:40 
UTC ---
Looking at the example in Comment #0, RTX expansion pass generates:

;; D.2794_77 = &q + D.2793_76;

(insn 84 83 85 (parallel [
(set (reg:DI 173)
(plus:DI (reg/f:DI 54 virtual-stack-vars)
(const_int -160 [0xff60])))
(clobber (reg:CC 17 flags))
]) pr47744.c:5 -1
 (nil))

Why 64bit virtual register to hold &q _address_?


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #14 from Uros Bizjak  2011-07-17 20:07:38 
UTC ---
(In reply to comment #13)
> Looking at the example in Comment #0, RTX expansion pass generates:
> 
> ;; D.2794_77 = &q + D.2793_76;
> 
> (insn 84 83 85 (parallel [
> (set (reg:DI 173)
> (plus:DI (reg/f:DI 54 virtual-stack-vars)
> (const_int -160 [0xff60])))
> (clobber (reg:CC 17 flags))
> ]) pr47744.c:5 -1
>  (nil))
> 
> Why 64bit virtual register to hold &q _address_?

Later, reg:DI 173 gets propagated into (insn 89):

(insn 89 87 90 3 (set (reg:SI 177)
(plus:SI (plus:SI (mult:SI (reg:SI 175)
(const_int 8 [0x8]))
(subreg:SI (reg/f:DI 20 frame) 0))
(const_int -160 [0xff60]))) pr47744.c:5 250
{*lea_2_x32}
 (expr_list:REG_DEAD (reg:SI 175)
(nil)))

which chokes reload when trying to eliminate frame pointer:

(insn 89 87 90 3 (set (reg:SI 39 r10 [177])
(plus:SI (plus:SI (mult:SI (reg:SI 0 ax [175])
(const_int 8 [0x8]))
(subreg:SI (plus:DI (reg/f:DI 7 sp)
(const_int 200 [0xc8])) 0))
(const_int -160 [0xff60]))) pr47744.c:5 250
{*lea_2_x32}
 (nil))


[Bug tree-optimization/49770] New: [4.7 Regression] wrong code with -fno-tree-forwprop

2011-07-17 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49770

   Summary: [4.7 Regression] wrong code with -fno-tree-forwprop
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


Created attachment 24781
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24781
reduced testcase

There are several libstdc++ test that FAIL with -fno-tree-ccp
-fno-tree-forwprop. Attached is testcase that FAILs with -fno-tree-forwprop.

Output:
$ g++ -O2 -std=gnu++0x -fno-tree-forwprop testcase.C
$ ./a.out 
Aborted

Tested revisions:
r176370 - fail
4.6 r176280 - OK


[Bug fortran/34657] program-unit MY_SUB imports symbol MY_SUB

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34657

--- Comment #5 from Tobias Burnus  2011-07-17 
20:17:42 UTC ---
FIXED on the trunk (4.7). Thanks for the bug report - and sorry that it took 3
years to fix it.


[Bug tree-optimization/49770] [4.7 Regression] wrong code with -fno-tree-forwprop

2011-07-17 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49770

--- Comment #1 from Zdenek Sojka  2011-07-17 20:19:23 
UTC ---
Created attachment 24782
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24782
original testcase (preprocessed)

Output:
$ g++ -O2 -std=gnu++0x -fno-tree-forwprop moveable.ii
$ ./a.out 
a.out:
/mnt/svn/gcc-trunk/libstdc++-v3/testsuite/23_containers/queue/moveable.cc:36:
void test01(): Assertion `b.size() == 1 && b.front() == 1 && a.size() == 0'
failed.
Aborted


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #15 from H.J. Lu  2011-07-17 20:26:47 
UTC ---
(In reply to comment #13)
> Looking at the example in Comment #0, RTX expansion pass generates:
> 
> ;; D.2794_77 = &q + D.2793_76;
> 
> (insn 84 83 85 (parallel [
> (set (reg:DI 173)
> (plus:DI (reg/f:DI 54 virtual-stack-vars)
> (const_int -160 [0xff60])))
> (clobber (reg:CC 17 flags))
> ]) pr47744.c:5 -1
>  (nil))
> 
> Why 64bit virtual register to hold &q _address_?

I guess it is because we use 64bit Pmode for x32.


[Bug tree-optimization/49771] New: [4.7 Regression] wrong code with -ftree-vectorize

2011-07-17 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49771

   Summary: [4.7 Regression] wrong code with -ftree-vectorize
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


Created attachment 24783
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24783
reduced testcase (from gcc.dg/graphite/block-0.c)

Output:
$ gcc -O -ftree-vectorize testcase.c
$ ./a.out 
Aborted
$ gcc -O3 testcase.c
$ ./a.out 
Aborted

Tested revisions:
r176370 - fail
4.6 r176280 - OK


[Bug tree-optimization/49772] New: [4.7 Regression] ICE: in ipa_pta_execute, at tree-ssa-structalias.c:6790 with -fipa-pta

2011-07-17 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49772

   Summary: [4.7 Regression] ICE: in ipa_pta_execute, at
tree-ssa-structalias.c:6790 with -fipa-pta
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz
CC: rgue...@gcc.gnu.org
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu


Created attachment 24784
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24784
reduced testcase (from g++.dg/tree-ssa/pr42337.C)

Compiler output:
$ gcc -O -fipa-pta testcase.C 
testcase.C: In member function 'int S<  >::foo() [with
 = int]':
testcase.C:4:39: error: inlining failed in call to always_inline 'int S<
 >::foo() [with  = int]':
recursive inlining
testcase.C:7:7: error: called from here
testcase.C: At global scope:
testcase.C:16:1: internal compiler error: in ipa_pta_execute, at
tree-ssa-structalias.c:6790
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Compiler output - 4.6:
$ gcc -O -fipa-pta testcase.C 
testcase.C: In function 'void foo()':
testcase.C:4:39: sorry, unimplemented: inlining failed in call to 'int S<
 >::foo() [with  = int]':
recursive inlining
testcase.C:7:7: sorry, unimplemented: called from here

Tested revisions:
r176370 - crash
4.6 r176280 - sorry


[Bug tree-optimization/49772] [4.7 Regression] ICE: in ipa_pta_execute, at tree-ssa-structalias.c:6790 with -fipa-pta

2011-07-17 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49772

Zdenek Sojka  changed:

   What|Removed |Added

  Attachment #24784|0   |1
is obsolete||

--- Comment #1 from Zdenek Sojka  2011-07-17 21:06:08 
UTC ---
Created attachment 24785
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24785
reduced testcase (from g++.dg/tree-ssa/pr42337.C)


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #16 from Uros Bizjak  2011-07-17 21:14:05 
UTC ---
Following patch to original ix86_decompose_address solves all failures for me:

--cut here--
Index: i386.c
===
--- i386.c(revision 176373)
+++ i386.c(working copy)
@@ -11149,8 +11149,11 @@ ix86_decompose_address (rtx addr, struct
 return 0;
   break;

-case REG:
 case SUBREG:
+  if (GET_CODE (op) != REG)
+return 0;
+
+case REG:
   if (!base)
 base = op;
   else if (!index)
--cut here--

The patch simply prevents subregs of anything else than registers in addresses.

So, instead of mess as in comment 14, we have a sequence of two instructions:

(insn 185 87 89 3 (set (reg:DI 0 ax)
(plus:DI (reg/f:DI 7 sp)
(const_int 200 [0xc8]))) pr47744.c:5 248 {*lea_1}
 (nil))

(insn 89 185 90 3 (set (reg:SI 40 r11 [177])
(plus:SI (plus:SI (mult:SI (reg:SI 40 r11 [175])
(const_int 8 [0x8]))
(reg:SI 0 ax))
(const_int -160 [0xff60]))) pr47744.c:5 286
{*lea_general_3}
 (nil))

Please note, that "normal" lea instructions are now generated, no need for some
special x32 versions.

BTW: I'd also argue that this sequence is more correct w.r.t. to overflows, but
I didn't investigate this since it is already late in the night here...


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #17 from H.J. Lu  2011-07-17 21:21:01 
UTC ---
(In reply to comment #16)
> Following patch to original ix86_decompose_address solves all failures for me:
> 
> --cut here--
> Index: i386.c
> ===
> --- i386.c(revision 176373)
> +++ i386.c(working copy)
> @@ -11149,8 +11149,11 @@ ix86_decompose_address (rtx addr, struct
>  return 0;
>break;
> 
> -case REG:
>  case SUBREG:
> +  if (GET_CODE (op) != REG)
> +return 0;
> +
> +case REG:
>if (!base)
>  base = op;
>else if (!index)
> --cut here--
> 
> The patch simply prevents subregs of anything else than registers in 
> addresses.
> 
> So, instead of mess as in comment 14, we have a sequence of two instructions:
> 
> (insn 185 87 89 3 (set (reg:DI 0 ax)
> (plus:DI (reg/f:DI 7 sp)
> (const_int 200 [0xc8]))) pr47744.c:5 248 {*lea_1}
>  (nil))
> 
> (insn 89 185 90 3 (set (reg:SI 40 r11 [177])
> (plus:SI (plus:SI (mult:SI (reg:SI 40 r11 [175])
> (const_int 8 [0x8]))
> (reg:SI 0 ax))
> (const_int -160 [0xff60]))) pr47744.c:5 286
> {*lea_general_3}
>  (nil))
> 
> Please note, that "normal" lea instructions are now generated, no need for 
> some
> special x32 versions.
> 
> BTW: I'd also argue that this sequence is more correct w.r.t. to overflows, 
> but
> I didn't investigate this since it is already late in the night here...

I will give it a try on x32 branch.  Thanks.


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #23 from John David Anglin  2011-07-17 
21:27:01 UTC ---
Author: danglin
Date: Sun Jul 17 21:26:59 2011
New Revision: 176377

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176377
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  

* config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
patterns.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/pa/pa.md


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #18 from H.J. Lu  2011-07-17 21:28:02 
UTC ---
(In reply to comment #16)
> Following patch to original ix86_decompose_address solves all failures for me:
> 
> --cut here--
> Index: i386.c
> ===
> --- i386.c(revision 176373)
> +++ i386.c(working copy)
> @@ -11149,8 +11149,11 @@ ix86_decompose_address (rtx addr, struct
>  return 0;
>break;
> 
> -case REG:
>  case SUBREG:
> +  if (GET_CODE (op) != REG)
> +return 0;
> +
> +case REG:
>if (!base)
>  base = op;
>else if (!index)
> --cut here--

This is the same as

---
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index c728c51..414b528 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11380,7 +11382,6 @@ ix86_decompose_address (rtx addr, struct ix86_address
*out)
   break;

 case REG:
-case SUBREG:
   if (!base)
 base = op;
   else if (!index)
--


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #24 from John David Anglin  2011-07-17 
21:30:35 UTC ---
Author: danglin
Date: Sun Jul 17 21:30:33 2011
New Revision: 176378

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176378
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  

* config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #25 from John David Anglin  2011-07-17 
21:32:59 UTC ---
Author: danglin
Date: Sun Jul 17 21:32:56 2011
New Revision: 176379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176379
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  

* config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #26 from John David Anglin  2011-07-17 
21:36:39 UTC ---
Author: danglin
Date: Sun Jul 17 21:36:36 2011
New Revision: 176380

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176380
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  

* config/pa/pa.md: Add ",*" condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

John David Anglin  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||danglin at gcc dot gnu.org
 Resolution||FIXED

--- Comment #27 from John David Anglin  2011-07-17 
21:43:32 UTC ---
Build issue should be fixed.  Please open new PR if socket issue
is GCC bug.


[Bug c/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.17 22:00:08
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.6.2
Summary|C99 style union |[4.6/4.7 Regression] C99
   |initializations does not|style union initializations
   |work as expected with   |does not work as expected
   |optimizations   |with optimizations
 Ever Confirmed|0   |1

--- Comment #3 from Jakub Jelinek  2011-07-17 
22:00:08 UTC ---
Confirmed.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #19 from Uros Bizjak  2011-07-17 22:04:31 
UTC ---
(In reply to comment #18)

> This is the same as
> 
> ---
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index c728c51..414b528 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -11380,7 +11382,6 @@ ix86_decompose_address (rtx addr, struct ix86_address
> *out)
>break;
> 
>  case REG:
> -case SUBREG:
>if (!base)
>  base = op;
>else if (!index)

No!

Subreg of a reg is perfectly valid RTX here.


[Bug c/49768] [4.6/4.7 Regression] C99 style union initializations does not work as expected with optimizations

2011-07-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49768

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |

--- Comment #4 from Jakub Jelinek  2011-07-17 
22:10:40 UTC ---
fold_nonarray_ctor_reference is buggy, it seems to consider only fields where
offset is within bitoffset .. bitoffset_end range.  But here offset is 0, size
is 8 and bitoffset is 1 and bitoffset_end 2.  These overlap, thus either
fold_nonarray_ctor_reference should give up (return NULL), or it should try to
reconstruct it from multiple fields.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #20 from H.J. Lu  2011-07-17 22:12:20 
UTC ---
(In reply to comment #19)
> (In reply to comment #18)
> 
> > This is the same as
> > 
> > ---
> > diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> > index c728c51..414b528 100644
> > --- a/gcc/config/i386/i386.c
> > +++ b/gcc/config/i386/i386.c
> > @@ -11380,7 +11382,6 @@ ix86_decompose_address (rtx addr, struct 
> > ix86_address
> > *out)
> >break;
> > 
> >  case REG:
> > -case SUBREG:
> >if (!base)
> >  base = op;
> >else if (!index)
> 
> No!
> 
> Subreg of a reg is perfectly valid RTX here.

The code in question is

switch (GET_CODE (op))
  {
...
  case REG:
  case SUBREG:
...
break;
...
  default:
return 0;
 }

 case SUBREG:
   if (GET_CODE (op) != REG)
 return 0;

always return 0.


[Bug other/49767] __mulsc3 runs into infinite recursion if GCC is compiled with -O0 option

2011-07-17 Thread waffle.bai at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49767

--- Comment #2 from waffle.bai at gmail dot com 2011-07-17 22:14:33 UTC ---
Thanks for noting,  Mikael!

(In reply to comment #1)
> I can reproduce this with gcc-4.3.2 on i686-linux / FC13, however 4.3.3 and
> newer appear to be fixed.
> 
> Please note that upstream support for gcc-4.3.x has ended.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #21 from Uros Bizjak  2011-07-17 22:17:31 
UTC ---
Ah, I see. So:

case SUBREG:
  if (SUBREG_REG (op) != REG)
return 0;

Works OK, too.


[Bug tree-optimization/49771] [4.7 Regression] wrong code with -ftree-vectorize

2011-07-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49771

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.17 22:26:59
 CC||jakub at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Jakub Jelinek  2011-07-17 
22:26:59 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176229


[Bug tree-optimization/49770] [4.7 Regression] wrong code with -fno-tree-forwprop

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49770

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.07.17 22:28:28
 CC||rguenth at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #2 from H.J. Lu  2011-07-17 22:28:28 
UTC ---
It is caused by revision 175916:

http://gcc.gnu.org/ml/gcc-cvs/2011-07/msg00181.html


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #22 from H.J. Lu  2011-07-17 22:44:10 
UTC ---
(In reply to comment #21)
> Ah, I see. So:
> 
> case SUBREG:
>   if (SUBREG_REG (op) != REG)
> return 0;
> 
> Works OK, too.

Did you mean

case SUBREG:
  if (GET_CODE (SUBREG_REG (op)) != REG)
return 0;


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #23 from Uros Bizjak  2011-07-17 22:48:14 
UTC ---
(In reply to comment #22)

> 
> case SUBREG:
>   if (GET_CODE (SUBREG_REG (op)) != REG)
> return 0;

Yes.


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #24 from H.J. Lu  2011-07-17 22:55:26 
UTC ---
(In reply to comment #23)
> (In reply to comment #22)
> 
> > 
> > case SUBREG:
> >   if (GET_CODE (SUBREG_REG (op)) != REG)
> > return 0;
> 
> Yes.

It doesn't work. I got

/export/gnu/import/git/gcc-x32/libgfortran/generated/matmul_i16.c: In function
\u2018matmul_i16\u2019:
/export/gnu/import/git/gcc-x32/libgfortran/generated/matmul_i16.c:374:1: error:
insn does not satisfy its constraints:
(insn 3660 703 704 76 (set (reg:TI 0 ax)
(mem:TI (zero_extend:DI (plus:SI (reg:SI 2 cx [orig:818 ivtmp.117 ]
[818])
(reg:SI 5 di [orig:292 dest_y ] [292]))) [6 MEM[base:
dest_y_236, index: ivtmp.117_554, offset: 0B]+0 S16 A128]))
/export/gnu/import/git/gcc-x32/libgfortran/generated/matmul_i16.c:284 60
{*movti_internal_rex64}
 (nil))
/export/gnu/import/git/gcc-x32/libgfortran/generated/matmul_i16.c:374:1:
internal compiler error: in reload_cse_simplify_operands, at postreload.c:403
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[6]: *** [matmul_i16.lo] Error 1


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #25 from Uros Bizjak  2011-07-17 22:59:39 
UTC ---
> It doesn't work. I got

Yeah, I found the problem, we have to allow only non-eliminable registers.

Please try this:

case SUBREG:
  if (TARGET_X32
  && !register_no_elim_operand (op, Pmode))
return 0;


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #26 from H.J. Lu  2011-07-18 00:02:41 
UTC ---
(In reply to comment #25)
> > It doesn't work. I got
> 
> Yeah, I found the problem, we have to allow only non-eliminable registers.
> 
> Please try this:
> 
> case SUBREG:
>   if (TARGET_X32
>   && !register_no_elim_operand (op, Pmode))
> return 0;

It works much better.  But it still caused a few regressions on x32 branch:

FAIL: gcc.target/i386/pr45670.c scan-assembler-not lea[lq]
FAIL: gfortran.dg/character_array_constructor_1.f90  -O1  (internal compiler
error)
FAIL: gfortran.dg/character_array_constructor_1.f90  -O1  (test for excess
errors)
FAIL: gfortran.dg/cshift_large_1.f90  -Os  (internal compiler error)
FAIL: gfortran.dg/cshift_large_1.f90  -Os  (test for excess errors)
FAIL: gfortran.dg/eoshift_large_1.f90  -Os  (internal compiler error)
FAIL: gfortran.dg/eoshift_large_1.f90  -Os  (test for excess errors)


[Bug target/47744] [x32] ICE: in reload_cse_simplify_operands, at postreload.c:403

2011-07-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47744

--- Comment #27 from H.J. Lu  2011-07-18 04:17:24 
UTC ---
(In reply to comment #26)

> It works much better.  But it still caused a few regressions on x32 branch:
> 
> FAIL: gfortran.dg/character_array_constructor_1.f90  -O1  (internal compiler
> error)
> FAIL: gfortran.dg/character_array_constructor_1.f90  -O1  (test for excess
> errors)
> FAIL: gfortran.dg/cshift_large_1.f90  -Os  (internal compiler error)
> FAIL: gfortran.dg/cshift_large_1.f90  -Os  (test for excess errors)
> FAIL: gfortran.dg/eoshift_large_1.f90  -Os  (internal compiler error)
> FAIL: gfortran.dg/eoshift_large_1.f90  -Os  (test for excess errors)

They are fixed.


[Bug fortran/34657] program-unit MY_SUB imports symbol MY_SUB

2011-07-17 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34657

Tobias Burnus  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #6 from Tobias Burnus  2011-07-18 
06:20:23 UTC ---
(In reply to comment #5)
> FIXED on the trunk (4.7). Thanks for the bug report - and sorry that it took 3
> years to fix it.

Really close as FIXED