[Bug c++/41420] New: Command-line defines(-D) are not working with include(-I)

2009-09-20 Thread smal dot root at gmail dot com
We have simple source file: file.64.cpp
int main()
{
#ifdef SOME64
printf("64\r\n");
#else
printf("32\r\n");
#endif
return 0;
}

So. If we build file with that command
$CC -DSOME64 -I../../common/src -O0 -g3 -Wall -c "systemcontroller.64.cpp"
then SOME64 are undefined in file(../../common/src is valid path).
if we erase include block(-I) or write invalid path like this
$CC -DSOME64 -I../../common/src_1 -O0 -g3 -Wall -c "systemcontroller.64.cpp"
than everithing work fine... i mean SOME64 are defined in file.

$CC can be g++, gcc, cc, c++.

os: Bluewhite64-current
gcc-config:
Reading specs from /usr/lib/gcc/x86_64-pc-linux/4.3.3/specs
Target: x86_64-pc-linux
Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib
--enable-shared --enable-bootstrap
--enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix
--enable-checking=release --with-system-zlib --disable-libunwind-exceptions
--enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose
--disable-multilib --target=x86_64-pc-linux --build=x86_64-pc-linux
--host=x86_64-pc-linux
Thread model: posix
gcc version 4.3.3 (GCC)


-- 
   Summary: Command-line defines(-D) are not working with include(-
I)
   Product: gcc
   Version: 4.3.3
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: smal dot root at gmail dot com
 GCC build triplet: x86_64
  GCC host triplet: x86_64
GCC target triplet: x86_64


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



[Bug c++/41420] Command-line defines(-D) are not working with include(-I)

2009-09-20 Thread smal dot root at gmail dot com


--- Comment #2 from smal dot root at gmail dot com  2009-09-20 17:30 ---
I correct clock, restart Xorg and everything work... Its good. Sorry


-- 

smal dot root at gmail dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID


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



[Bug c/43104] New: Incorrect code generation for target mcu ATMega164P

2010-02-17 Thread smal dot root at gmail dot com
Source

volatile uint8_t mUsart0BufferReadPtr;

void Usart0AtModeSkipLine(void)
{
uint8_t rdptr = 0;

rdptr = mUsart0BufferReadPtr;
rdptr = mUsart0BufferReadPtr;
rdptr = mUsart0BufferReadPtr;
}
-
Generated asm
+0694:   93DFPUSH  R29Push register on stack
+0695:   93CFPUSH  R28Push register on stack
+0696:   920FPUSH  R0 Push register on stack
+0697:   B7CDINR28,0x3D   In from I/O location
+0698:   B7DEINR29,0x3E   In from I/O location
179:  uint8_t rdptr = 0;
+0699:   8219STD   Y+1,R1 Store indirect with
displacement
181:rdptr = mUsart0BufferReadPtr;
+069A:   9180LDS   R24,0x Load direct from data space
+069C:   8389STD   Y+1,R24Store indirect with
displacement
182:rdptr = mUsart0BufferReadPtr;
+069D:   91800264LDS   R24,0x0264 Load direct from data space
+069F:   8389STD   Y+1,R24Store indirect with
displacement
183:rdptr = mUsart0BufferReadPtr;
+06A0:   91800264LDS   R24,0x0264 Load direct from data space
+06A2:   8389STD   Y+1,R24Store indirect with
displacement


OS: WinXP
gcc: avr-gcc.EXE (WinAVR 20100110) 4.3.3


-- 
   Summary: Incorrect code generation for target mcu ATMega164P
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: smal dot root at gmail dot com
  GCC host triplet: Win32
GCC target triplet: avr


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



[Bug target/43104] Incorrect code generation for target mcu ATMega164P

2010-03-08 Thread smal dot root at gmail dot com


--- Comment #2 from smal dot root at gmail dot com  2010-03-08 21:15 ---
(In reply to comment #1)
> I cannot reproduce the problem.
> 
>c:   80 91 00 00 lds r24, 0x

Its mean load data from SRAM at address 0x. Variable (in our case
mUsart0BufferReadPtr) has address not equal to zero.

In my first post i use three equal strings
rdptr = mUsart0BufferReadPtr;
because first generated with error


-- 


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



[Bug target/43104] Incorrect code generation for target mcu ATMega164P

2010-03-08 Thread smal dot root at gmail dot com


--- Comment #4 from smal dot root at gmail dot com  2010-03-08 21:49 ---
> I still cannot reproduce the error
you got
>>lds r24, 0x
that is error!
address of variable is NULL. Address of
volatile uint8_t SomeVariable
cant be NULL in any case.
--
Data Memory Map for ATmega164P/324P/644P.
0x - 0x001F - 32 Registers
0x0020 - 0x005F - 64 I/O Registers
0x0060 - 0x00FF - 160 Ext I/O Reg.
0x0100 - 0x04FF/0x08FF/0x10FF - Internal SRAM (1024/2048/4096 x 8)


-- 


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



[Bug target/43104] Incorrect code generation for target mcu ATMega164P

2010-03-08 Thread smal dot root at gmail dot com


--- Comment #6 from smal dot root at gmail dot com  2010-03-09 01:02 ---
Well, I will make necessary tests


-- 


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