A few considerations:
1. A gap of not working will always have to be explained for the rest of your career---licensing boards, employers, hospital privileges, etc. How do you think a history of quitting suddenly once you have another opportunity will make you look?
2. This could have ramifications in your new residency program as bailing on one program is generally viewed as a red flag. It may very well make your PD-to-be want to rescind your offer (not sure if they could argue that it is contigent upon completion of your current program year in good standing if you go through the match; this would be a possibility if you didn't go through the match, however). They will wonder if you quit or were forced out....either way, this could affect how you are perceived at the new program.
3. Abruptly leaving residency will likely *always* make people wonder if you quit, were forced out, or had some other issue, as most people don't do this. This can affect your future jobs as well. And potential fellowships.
If your contract dates overlap, you will have to discuss with your current PD whether you can leave early or use vacation time to allow you to go to the other program. However, not all programs start mid-June. I had some orientation things a few days before July 1 (some of which you may not need, like ACLS, as you likely have that from your current program), but my first day of work was July 1.